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
1ab05faf
Commit
1ab05faf
authored
Mar 24, 2018
by
Tianqi Chen
Committed by
GitHub
Mar 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CYTHON] Fix exception propagation for cython3 (#1046)
parent
8084a4da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
python/tvm/_ffi/_cython/base.pxi
+2
-2
python/tvm/_ffi/_cython/function.pxi
+5
-4
No files found.
python/tvm/_ffi/_cython/base.pxi
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,
...
...
python/tvm/_ffi/_cython/function.pxi
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)
...
...
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