-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ScaledArray aval and create factory method. (#10)
* `ScaledArray.aval` returning JAX `ShapedArray`, like JAX API; * Factory method `scaled_array`, similar to `jnp.array`; The latter makes testing code simpler & clearer.
- Loading branch information
Showing
5 changed files
with
75 additions
and
45 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (c) 2023 Graphcore Ltd. All rights reserved. | ||
from . import lax | ||
from ._version import __version__ | ||
from .core import ScaledArray, autoscale # noqa: F401 | ||
from .core import ScaledArray, autoscale, scaled_array # noqa: F401 |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Copyright (c) 2023 Graphcore Ltd. All rights reserved. | ||
from .datatype import ScaledArray # noqa: F401 | ||
from .datatype import ScaledArray, scaled_array # noqa: F401 | ||
from .interpreters import autoscale, register_scaled_lax_op, register_scaled_op # noqa: F401 |
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
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