Commit 3565b9b
committed
Use Python implementation for AdvancedInSubtensor1
MapIter was removed from the public numpy C-API in
version 2.0, so we raise a not implemented error to
default to the python code for the AdvancedInSubtensor1.
The python version, defined in `AdvancedInSubtensor1.perform`
calls `np.add.at`, which uses `MapIter` behind the scenes.
There is active development on Numpy to improve the efficiency
of `np.add.at`.
To skip the C implementation and use the Python implementation,
we raise a NotImplementedError for this op's c code if numpy>=2.0.1 parent 165e7e4 commit 3565b9b
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2522 | 2522 | | |
2523 | 2523 | | |
2524 | 2524 | | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
2525 | 2528 | | |
2526 | 2529 | | |
2527 | 2530 | | |
| |||
0 commit comments