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
e22ac6b3
Commit
e22ac6b3
authored
Sep 22, 2018
by
Sergei Grechanik
Committed by
Tianqi Chen
Sep 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TVM] Fix operator!= for Tensor (#1753)
parent
d1e048b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
include/tvm/tensor.h
+10
-0
No files found.
include/tvm/tensor.h
View file @
e22ac6b3
...
...
@@ -45,6 +45,12 @@ class Tensor : public NodeRef {
* \return whether the two tensors equals each other.
*/
inline
bool
operator
==
(
const
Tensor
&
other
)
const
;
/*!
* \brief check if two tensors are different.
* \param other tensor to be checked.
* \return whether the two tensors are different.
*/
inline
bool
operator
!=
(
const
Tensor
&
other
)
const
;
/*! \return The dimension of the tensor */
inline
size_t
ndim
()
const
;
/*!
...
...
@@ -184,6 +190,10 @@ inline bool Tensor::operator==(const Tensor& other) const {
}
}
inline
bool
Tensor
::
operator
!=
(
const
Tensor
&
other
)
const
{
return
!
(
*
this
==
other
);
}
// macro to turn every operation of slice to expression
#define DEFINE_OVERLOAD_SLICE_UNARY_OP(Op) \
inline Expr operator Op (const Tensor::Slice& a) { \
...
...
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