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
OpenDAS
bitsandbytes
Commits
d05b5083
Unverified
Commit
d05b5083
authored
Jan 08, 2024
by
Ian Butler
Committed by
GitHub
Jan 08, 2024
Browse files
Move to CPU before attempting to convert to numpy. (#922)
parent
4870580f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bitsandbytes/utils.py
bitsandbytes/utils.py
+1
-1
No files found.
bitsandbytes/utils.py
View file @
d05b5083
...
@@ -187,7 +187,7 @@ def unpack_tensor_to_dict(tensor_data):
...
@@ -187,7 +187,7 @@ def unpack_tensor_to_dict(tensor_data):
Returns:
Returns:
A Python dictionary containing the unpacked data.
A Python dictionary containing the unpacked data.
"""
"""
json_bytes
=
bytes
(
tensor_data
.
numpy
())
json_bytes
=
bytes
(
tensor_data
.
cpu
().
numpy
())
json_str
=
json_bytes
.
decode
(
'utf-8'
)
json_str
=
json_bytes
.
decode
(
'utf-8'
)
unpacked_dict
=
json
.
loads
(
json_str
)
unpacked_dict
=
json
.
loads
(
json_str
)
...
...
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