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
1ab05faf
Commit
1ab05faf
authored
7 years ago
by
Tianqi Chen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[CYTHON] Fix exception propagation for cython3 (#1046)
parent
8084a4da
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
python/tvm/_ffi/_cython/base.pxi
+2
-2
2 additions, 2 deletions
python/tvm/_ffi/_cython/base.pxi
python/tvm/_ffi/_cython/function.pxi
+5
-4
5 additions, 4 deletions
python/tvm/_ffi/_cython/function.pxi
with
7 additions
and
6 deletions
python/tvm/_ffi/_cython/base.pxi
+
2
−
2
View file @
1ab05faf
...
...
@@ -64,8 +64,8 @@ ctypedef int (*TVMPackedCFunc)(
ctypedef
void
(
*
TVMPackedCFuncFinalizer
)(
void
*
resource_handle
)
cdef
extern
from
"
tvm/runtime/c_runtime_api.h
"
:
void
TVMAPISetLastError
(
const
char
*
msg
)
;
const
char
*
TVMGetLastError
()
;
void
TVMAPISetLastError
(
const
char
*
msg
)
const
char
*
TVMGetLastError
()
int
TVMFuncCall
(
TVMFunctionHandle
func
,
TVMValue
*
arg_values
,
int
*
type_codes
,
...
...
This diff is collapsed.
Click to expand it.
python/tvm/_ffi/_cython/function.pxi
+
5
−
4
View file @
1ab05faf
...
...
@@ -74,10 +74,10 @@ def convert_to_tvm_func(object pyfunc):
return
ret
cdef
inline
void
make_arg
(
object
arg
,
TVMValue
*
value
,
int
*
tcode
,
list
temp_args
):
cdef
inline
int
make_arg
(
object
arg
,
TVMValue
*
value
,
int
*
tcode
,
list
temp_args
)
except
-
1
:
"""
Pack arguments into c args tvm call accept
"""
cdef
unsigned
long
long
ptr
if
isinstance
(
arg
,
NodeBase
):
...
...
@@ -152,6 +152,7 @@ cdef inline void make_arg(object arg,
temp_args
.
append
(
arg
)
else
:
raise
TypeError
(
"
Don
'
t know how to handle type %s
"
%
type
(
arg
))
return
0
cdef
inline
bytearray
make_ret_bytes
(
void
*
chandle
):
handle
=
ctypes_handle
(
chandle
)
...
...
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