-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
OBJECT_HANDLE = 7 | ||
STR = 8 | ||
BYTES = 9 | ||
PYARG = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this type code for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically it designates a python argument to be returned. For example, PythonArg(2) says the 2nd python argument should be returned.
It is introduced for out
. If parameter out
is not None
, then out
should serve as the return value. Note that we should not return the NDArray*
specified by out
, as it creates another NDArrayBase
in frontend, and thus one NDArray*
in backend gets destructed twice by two frontend NDArrayBase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* FFI cumsum * Dispatch ufunc * Add PythonArg * Remove unused data type * Seperate op_utils and utils
* FFI cumsum * Dispatch ufunc * Add PythonArg * Remove unused data type * Seperate op_utils and utils
* FFI cumsum * Dispatch ufunc * Add PythonArg * Remove unused data type * Seperate op_utils and utils
Description
Use new ffi for cumsum and add for better speed. Also two changes to the new ffi infra:
out
for new ffi.add
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
@haojin2 @reminisce