Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
e580d751
Unverified
Commit
e580d751
authored
May 16, 2025
by
PanZezhong1725
Committed by
GitHub
May 16, 2025
Browse files
Merge pull request #217 from wooway777/issue/216
issue/216 - Fixed Enum Camparison in util.py
parents
0c803397
b2b4526b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
test/infiniop/libinfiniop/utils.py
test/infiniop/libinfiniop/utils.py
+1
-1
No files found.
test/infiniop/libinfiniop/utils.py
View file @
e580d751
...
@@ -478,7 +478,7 @@ def get_sync_func(device):
...
@@ -478,7 +478,7 @@ def get_sync_func(device):
import
torch
import
torch
device_str
=
infiniDeviceEnum_str_map
[
device
]
device_str
=
infiniDeviceEnum_str_map
[
device
]
if
device
_str
==
"cpu"
:
if
device
==
InfiniDeviceEnum
.
CPU
:
sync
=
None
sync
=
None
else
:
else
:
sync
=
getattr
(
torch
,
device_str
).
synchronize
sync
=
getattr
(
torch
,
device_str
).
synchronize
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment