-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Wrong result when using new numpy ffi in deferred compute #18004
Comments
Thanks for reporting the issue. I can confirm that disabling the new FFI for diff --git a/python/mxnet/ndarray/numpy/_op.py b/python/mxnet/ndarray/numpy/_op.py
index 4820f56f3..8ff7ba073 100644
--- a/python/mxnet/ndarray/numpy/_op.py
+++ b/python/mxnet/ndarray/numpy/_op.py
@@ -2051,7 +2051,7 @@ def tril(m, k=0):
[ 7., 8., 0.],
[10., 11., 12.]])
"""
- return _api_internal.tril(m, k)
+ return _npi.tril(m, k)
def _unary_func_helper(x, fn_array, fn_scalar, out=None, **kwargs): |
@leezu Have you been able to find the root cause for this bug? |
@haojin2 sorry, I didn't get to dive deep on this issue yet. I'll work on this during our bug bash in the coming week. |
It's due to common expression elimination. As workaround one could set For the old FFI, For the new FFI, the reason is only parses attributes if autograd is enabled, whereas the old FFI always parses attributes. This was an oversight when I rebased the DC PR on top of the FFI update PR. |
Find it in CI result of #17958.
Reproduce:
Sample code, use master branch
Results:
If replace
_api_internal.tril
by_npi.tril
, the result is right.@leezu Can you take a look at this?
The text was updated successfully, but these errors were encountered: