Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
e22ac6b3
Commit
e22ac6b3
authored
6 years ago
by
Sergei Grechanik
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[TVM] Fix operator!= for Tensor (#1753)
parent
d1e048b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/tvm/tensor.h
+10
-0
10 additions, 0 deletions
include/tvm/tensor.h
with
10 additions
and
0 deletions
include/tvm/tensor.h
+
10
−
0
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) { \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment