Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
6f7d6fa4
Unverified
Commit
6f7d6fa4
authored
Feb 03, 2020
by
Tianqi Chen
Committed by
GitHub
Feb 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LINT] Fix -Wextra (#4804)
* [LINT] Fix -Wextra * Fix virtual-dtor
parent
974195de
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
33 additions
and
9 deletions
+33
-9
include/tvm/ir/attrs.h
+2
-0
include/tvm/ir/op.h
+1
-1
include/tvm/ir/type_relation.h
+2
-0
include/tvm/node/container.h
+2
-2
include/tvm/relay/expr.h
+2
-0
include/tvm/runtime/object.h
+2
-2
include/tvm/tir/expr.h
+2
-0
src/ir/attr_functor.h
+2
-0
src/ir/op.cc
+1
-1
src/relay/backend/compile_engine.h
+2
-0
src/relay/backend/contrib/codegen_c/codegen_c.h
+4
-0
src/relay/pass/combine_parallel_op.h
+2
-0
src/relay/pass/partial_eval.cc
+1
-0
src/relay/pass/transform_layout.h
+2
-0
src/relay/qnn/util.h
+2
-2
src/runtime/library_module.h
+2
-0
src/target/source/codegen_cuda.cc
+1
-0
vta/src/runtime.cc
+1
-1
No files found.
include/tvm/ir/attrs.h
View file @
6f7d6fa4
...
...
@@ -222,6 +222,8 @@ class BaseAttrsNode : public Object {
public
:
using
TVMArgs
=
runtime
::
TVMArgs
;
using
TVMRetValue
=
runtime
::
TVMRetValue
;
/*! \brief virtual destructor */
virtual
~
BaseAttrsNode
()
{}
// visit function
virtual
void
VisitAttrs
(
AttrVisitor
*
v
)
{}
/*!
...
...
include/tvm/ir/op.h
View file @
6f7d6fa4
...
...
@@ -192,7 +192,7 @@ class Op : public RelayExpr {
* \param key The attribute key
* \return bool True if the key is present
*/
TVM_DLL
static
const
bool
HasGenericAttr
(
const
std
::
string
&
key
);
TVM_DLL
static
bool
HasGenericAttr
(
const
std
::
string
&
key
);
};
/*!
...
...
include/tvm/ir/type_relation.h
View file @
6f7d6fa4
...
...
@@ -76,6 +76,8 @@ class TypeCall : public Type {
*/
class
TypeReporterNode
:
public
Object
{
public
:
/*! \brief virtual destructor */
virtual
~
TypeReporterNode
()
{}
/*!
* \brief Create a type equality constraint.
*
...
...
include/tvm/node/container.h
View file @
6f7d6fa4
...
...
@@ -150,14 +150,14 @@ class Array : public ObjectRef {
* \brief move constructor
* \param other source
*/
Array
(
Array
<
T
>
&&
other
)
{
// NOLINT(*)
Array
(
Array
<
T
>
&&
other
)
:
ObjectRef
()
{
// NOLINT(*)
data_
=
std
::
move
(
other
.
data_
);
}
/*!
* \brief copy constructor
* \param other source
*/
Array
(
const
Array
<
T
>
&
other
)
{
// NOLINT(*)
Array
(
const
Array
<
T
>
&
other
)
:
ObjectRef
()
{
// NOLINT(*)
data_
=
std
::
move
(
other
.
data_
);
}
/*!
...
...
include/tvm/relay/expr.h
View file @
6f7d6fa4
...
...
@@ -526,6 +526,8 @@ class RefWrite : public Expr {
*/
class
TempExprNode
:
public
ExprNode
{
public
:
/*! \brief virtual destructor */
virtual
~
TempExprNode
()
{}
/*!
* \brief Convert the expression to a normal(non-temp) Expr.
* \return The corresponding normal(non-temp) expression.
...
...
include/tvm/runtime/object.h
View file @
6f7d6fa4
...
...
@@ -649,13 +649,13 @@ struct ObjectEqual {
*/
#define TVM_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType) \
static_assert(!ParentType::_type_final, "ParentObj maked as final"); \
static
const uint32_t RuntimeTypeIndex() {
\
static
uint32_t RuntimeTypeIndex() {
\
if (TypeName::_type_index != ::tvm::runtime::TypeIndex::kDynamic) { \
return TypeName::_type_index; \
} \
return _GetOrAllocRuntimeTypeIndex(); \
} \
static
const uint32_t _GetOrAllocRuntimeTypeIndex() {
\
static
uint32_t _GetOrAllocRuntimeTypeIndex() {
\
static uint32_t tidx = Object::GetOrAllocRuntimeTypeIndex( \
TypeName::_type_key, \
TypeName::_type_index, \
...
...
include/tvm/tir/expr.h
View file @
6f7d6fa4
...
...
@@ -731,6 +731,8 @@ class LetNode : public PrimExprNode {
/*! \brief Base node of internal functions. */
class
FunctionBaseNode
:
public
Object
{
public
:
/*! \brief virtual destructor */
virtual
~
FunctionBaseNode
()
{}
/*! \return the name of the function */
virtual
const
std
::
string
&
func_name
()
const
=
0
;
/*! \return the number of outputs of this function */
...
...
src/ir/attr_functor.h
View file @
6f7d6fa4
...
...
@@ -60,6 +60,8 @@ class AttrFunctor<R(const ObjectRef& n, Args...)> {
public
:
/*! \brief the result type of this functor */
using
result_type
=
R
;
/*! \brief virtual destructor */
virtual
~
AttrFunctor
()
{}
/*!
* \brief The functor call.
* \param n The expression node.
...
...
src/ir/op.cc
View file @
6f7d6fa4
...
...
@@ -87,7 +87,7 @@ const GenericOpMap& Op::GetGenericAttr(const std::string& key) {
}
// Check if a key is present in the registry.
const
bool
Op
::
HasGenericAttr
(
const
std
::
string
&
key
)
{
bool
Op
::
HasGenericAttr
(
const
std
::
string
&
key
)
{
OpManager
*
mgr
=
OpManager
::
Global
();
std
::
lock_guard
<
std
::
mutex
>
lock
(
mgr
->
mutex
);
auto
it
=
mgr
->
attr
.
find
(
key
);
...
...
src/relay/backend/compile_engine.h
View file @
6f7d6fa4
...
...
@@ -171,6 +171,8 @@ class CCacheValue : public ObjectRef {
*/
class
CompileEngineNode
:
public
Object
{
public
:
/*! \brief destructor */
virtual
~
CompileEngineNode
()
{}
/*!
* \brief Get lowered result.
* \param key The key to the cached function.
...
...
src/relay/backend/contrib/codegen_c/codegen_c.h
View file @
6f7d6fa4
...
...
@@ -38,6 +38,7 @@ namespace contrib {
class
CSourceModuleCodegenBase
{
public
:
CSourceModuleCodegenBase
()
=
default
;
virtual
~
CSourceModuleCodegenBase
()
=
default
;
/*!
* \brief Create a runtime module for the external library. For example, it
...
...
@@ -69,6 +70,9 @@ class CSourceModuleCodegenBase {
// The base class to generate the declaration functions in C.
class
CodegenCBase
{
public
:
virtual
~
CodegenCBase
()
{}
protected
:
/*! \brief Print indents using spaces. */
void
PrintIndents
()
{
...
...
src/relay/pass/combine_parallel_op.h
View file @
6f7d6fa4
...
...
@@ -126,6 +126,8 @@ class BranchGroupFinder : private ExprVisitor {
*/
class
ParallelOpCombiner
{
public
:
/*! \brief virtual destructor */
virtual
~
ParallelOpCombiner
()
{}
/*
* \brief Constructor.
* \param op_name name of op to combine
...
...
src/relay/pass/partial_eval.cc
View file @
6f7d6fa4
...
...
@@ -275,6 +275,7 @@ class Fuel : public ObjectRef {
class
FuelNode
:
public
RelayNode
{
public
:
virtual
~
FuelNode
()
{}
// Please implement one of the following function or there will be infinite loop.
/*! \brief return the new Fuel, and whether progress is made.
*
...
...
src/relay/pass/transform_layout.h
View file @
6f7d6fa4
...
...
@@ -70,6 +70,8 @@ class TransformMemorizer : public ObjectRef {
TransformMemorizer
()
{}
explicit
TransformMemorizer
(
ObjectPtr
<
Object
>
n
)
:
ObjectRef
(
n
)
{}
virtual
~
TransformMemorizer
()
{}
TransformMemorizerNode
*
operator
->
()
{
return
static_cast
<
TransformMemorizerNode
*>
(
get_mutable
());
}
...
...
src/relay/qnn/util.h
View file @
6f7d6fa4
...
...
@@ -45,7 +45,7 @@ static inline Array<IndexExpr> get_shape(const Type& type) {
return
input_tt
->
shape
;
}
static
inline
const
int32_t
GetQmin
(
const
DataType
&
dtype
)
{
static
inline
int32_t
GetQmin
(
const
DataType
&
dtype
)
{
CHECK_LE
(
dtype
.
bits
(),
32
)
<<
"QNN ops support int32 or lower precision"
;
if
(
dtype
.
is_int
()
||
dtype
.
is_uint
())
{
...
...
@@ -58,7 +58,7 @@ static inline const int32_t GetQmin(const DataType& dtype) {
}
}
static
inline
const
int32_t
GetQmax
(
const
DataType
&
dtype
)
{
static
inline
int32_t
GetQmax
(
const
DataType
&
dtype
)
{
CHECK_LE
(
dtype
.
bits
(),
32
)
<<
"QNN ops support int32 or lower precision"
;
if
(
dtype
.
is_int
()
||
dtype
.
is_uint
())
{
...
...
src/runtime/library_module.h
View file @
6f7d6fa4
...
...
@@ -40,6 +40,8 @@ namespace runtime {
*/
class
Library
:
public
Object
{
public
:
// destructor.
virtual
~
Library
()
{}
/*!
* \brief Get the symbol address for a given name.
* \param name The name of the symbol.
...
...
src/target/source/codegen_cuda.cc
View file @
6f7d6fa4
...
...
@@ -190,6 +190,7 @@ void CodeGenCUDA::PrintType(DataType t, std::ostream& os) { // NOLINT(*)
}
else
{
// No longlong3, longlong4
LOG
(
FATAL
)
<<
"Cannot convert type "
<<
t
<<
" to CUDA type on a L32 platform"
;
break
;
}
}
else
{
os
<<
"long"
;
break
;
...
...
vta/src/runtime.cc
View file @
6f7d6fa4
...
...
@@ -314,7 +314,7 @@ class UopKernel {
template
<
class
T
>
class
BaseQueue
{
public
:
~
BaseQueue
()
{
virtual
~
BaseQueue
()
{
if
(
fpga_buff_
!=
nullptr
)
{
VTAMemFree
(
fpga_buff_
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment