Skip to content

Commit

Permalink
Merge pull request #281 from arogozhnikov/dev
Browse files Browse the repository at this point in the history
fix #279, update description
  • Loading branch information
arogozhnikov authored Sep 18, 2023
2 parents 37d7351 + fe91706 commit 3afbfd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions einops/_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
- backends are not imported unless those are actually needed, because
- backends may not be installed
- importing all available backends will drive to significant memory footprint
- backends may by present but installed with errors (but never used),
- backends may be present but installed with errors (but never used),
importing may drive to crashes
- backend should be either symbolic or imperative (tensorflow is for both, but that causes problems)
- backend should be either symbolic or imperative
- this determines which methods (from_numpy/to_numpy or create_symbol/eval_symbol) should be defined
- if backend can't (temporarily) provide symbols for shape dimensions, UnknownSize objects are used
- if backend can't provide symbols for shape dimensions, UnknownSize objects are used
"""

import sys
Expand All @@ -29,7 +29,7 @@ def get_backend(tensor) -> "AbstractBackend":
if _result is not None:
return _result

for framework_name, backend in _loaded_backends.items():
for framework_name, backend in list(_loaded_backends.items()):
if backend.is_appropriate_type(tensor):
_type2backend[_type] = backend
return backend
Expand Down
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def main():
"chainer": ["chainer"],
"cupy": ["cupy"],
"paddle": ["paddlepaddle==0.0.0 -f https://www.paddlepaddle.org.cn/whl/linux/cpu-mkl/develop.html"],
"oneflow": ["oneflow==0.9.0+cpu -f https://release.oneflow.info"],
"oneflow": ["oneflow==0.9.0"],
}

usage = f"""
Expand Down

0 comments on commit 3afbfd4

Please sign in to comment.