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
d6f3bf16
Commit
d6f3bf16
authored
6 years ago
by
abergeron
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add some missing operators (#1524)
parent
82e59385
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nnvm/python/nnvm/top/tensor.py
+8
-0
8 additions, 0 deletions
nnvm/python/nnvm/top/tensor.py
nnvm/src/top/tensor/elemwise.cc
+24
-0
24 additions, 0 deletions
nnvm/src/top/tensor/elemwise.cc
with
32 additions
and
0 deletions
nnvm/python/nnvm/top/tensor.py
+
8
−
0
View file @
d6f3bf16
...
...
@@ -156,6 +156,14 @@ reg.register_schedule("elemwise_mul", _fschedule_broadcast)
reg
.
register_pattern
(
"
elemwise_div
"
,
OpPattern
.
BROADCAST
)
reg
.
register_schedule
(
"
elemwise_div
"
,
_fschedule_broadcast
)
# elemwise_mod
reg
.
register_pattern
(
"
elemwise_mod
"
,
OpPattern
.
BROADCAST
)
reg
.
register_schedule
(
"
elemwise_mod
"
,
_fschedule_broadcast
)
# elemwise_pow
reg
.
register_pattern
(
"
elemwise_pow
"
,
OpPattern
.
BROADCAST
)
reg
.
register_schedule
(
"
elemwise_pow
"
,
_fschedule_broadcast
)
# broadcast_add
reg
.
register_pattern
(
"
broadcast_add
"
,
OpPattern
.
BROADCAST
)
reg
.
register_schedule
(
"
broadcast_add
"
,
_fschedule_broadcast
)
...
...
This diff is collapsed.
Click to expand it.
nnvm/src/top/tensor/elemwise.cc
+
24
−
0
View file @
d6f3bf16
...
...
@@ -337,6 +337,30 @@ NNVM_REGISTER_ELEMWISE_BINARY_OP(elemwise_div)
};
});
NNVM_REGISTER_ELEMWISE_BINARY_OP
(
elemwise_mod
)
.
describe
(
R"code(Element-wise modulo
)code"
NNVM_ADD_FILELINE
)
.
set_support_level
(
1
)
.
set_attr
<
FTVMCompute
>
(
"FTVMCompute"
,
[](
const
NodeAttrs
&
attrs
,
const
Array
<
Tensor
>&
inputs
,
const
Array
<
Tensor
>&
out_info
)
{
return
Array
<
Tensor
>
{
topi
::
mod
(
inputs
[
0
],
inputs
[
1
])
};
});
NNVM_REGISTER_ELEMWISE_BINARY_OP
(
elemwise_pow
)
.
describe
(
R"code(Element-wise power
)code"
NNVM_ADD_FILELINE
)
.
set_support_level
(
1
)
.
set_attr
<
FTVMCompute
>
(
"FTVMCompute"
,
[](
const
NodeAttrs
&
attrs
,
const
Array
<
Tensor
>&
inputs
,
const
Array
<
Tensor
>&
out_info
)
{
return
Array
<
Tensor
>
{
topi
::
power
(
inputs
[
0
],
inputs
[
1
])
};
});
// negative
NNVM_REGISTER_ELEMWISE_UNARY_OP
(
negative
)
.
describe
(
R"code(Elemenwise numeric negative
...
...
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