-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add paddle support in array-api-compat
- Loading branch information
1 parent
ee25aae
commit 8e5cc94
Showing
19 changed files
with
2,088 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Array API Tests (Paddle Latest) | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
array-api-tests-paddle: | ||
uses: ./.github/workflows/array-api-tests.yml | ||
with: | ||
package-name: paddle | ||
extra-env-vars: | | ||
ARRAY_API_TESTS_SKIP_DTYPES=uint16,uint32,uint64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from paddle import * # noqa: F403 | ||
|
||
# Several names are not included in the above import * | ||
import paddle | ||
|
||
for n in dir(paddle): | ||
if ( | ||
n.startswith("_") | ||
or n.endswith("_") | ||
or "gpu" in n | ||
or "cpu" in n | ||
or "backward" in n | ||
): | ||
continue | ||
exec(n + " = paddle." + n) | ||
exec("asarray = paddle.to_tensor") | ||
|
||
# These imports may overwrite names from the import * above. | ||
from ._aliases import * # noqa: F403 | ||
|
||
# See the comment in the numpy __init__.py | ||
__import__(__package__ + ".linalg") | ||
|
||
__import__(__package__ + ".fft") | ||
|
||
from ..common._helpers import * # noqa: F403 | ||
|
||
__array_api_version__ = "2023.12" |
Oops, something went wrong.