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
1ba443a4
Commit
1ba443a4
authored
6 years ago
by
Chang Lan
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use unsafe_get in nnvm (#2247)
parent
d1a0c901
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
3rdparty/dmlc-core
+1
-1
1 addition, 1 deletion
3rdparty/dmlc-core
nnvm/include/nnvm/base.h
+3
-0
3 additions, 0 deletions
nnvm/include/nnvm/base.h
nnvm/include/nnvm/graph.h
+1
-1
1 addition, 1 deletion
nnvm/include/nnvm/graph.h
with
5 additions
and
2 deletions
dmlc-core
@
519d013a
Compare
4d49691f
...
519d013a
Subproject commit
4d49691f1a9d944c3b0aa5e63f1db3cad1f941f
8
Subproject commit
519d013a213c0c447a971f51219473ef564d234
8
This diff is collapsed.
Click to expand it.
nnvm/include/nnvm/base.h
+
3
−
0
View file @
1ba443a4
...
...
@@ -25,6 +25,9 @@ using dmlc::array_view;
/*!\brief getter function of any type */
using
dmlc
::
get
;
/*!\brief "unsafe" getter function of any type */
using
dmlc
::
unsafe_get
;
}
// namespace nnvm
// describe op registration point
...
...
This diff is collapsed.
Click to expand it.
nnvm/include/nnvm/graph.h
+
1
−
1
View file @
1ba443a4
...
...
@@ -229,7 +229,7 @@ inline const T& Graph::GetAttr(const std::string& attr_name) const {
auto
it
=
attrs
.
find
(
attr_name
);
CHECK
(
it
!=
attrs
.
end
())
<<
"Cannot find attribute "
<<
attr_name
<<
" in the graph"
;
return
nnvm
::
get
<
T
>
(
*
it
->
second
);
return
nnvm
::
unsafe_
get
<
T
>
(
*
it
->
second
);
}
inline
bool
Graph
::
HasAttr
(
const
std
::
string
&
attr_name
)
const
{
...
...
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