We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94a0bf5 commit 5807ee1Copy full SHA for 5807ee1
src/compressed_tensors/transform/utils/hadamard.py
@@ -110,11 +110,11 @@ def _get_known_divisor(
110
:param n: size of known hadamard matrix
111
:return: a known hadamard matrix of size `n` if one exists, else None
112
"""
113
- with safe_open(file_path, framework="pt", device="cpu") as file:
+ with safe_open(file_path, framework="pt", device=str(device)) as file:
114
divisors = sorted([int(key) for key in file.keys()], reverse=True)
115
for divisor in divisors:
116
if n % divisor == 0 and is_pow2(n // divisor):
117
- return file.get_tensor(str(divisor)).to(dtype=dtype, device=device)
+ return file.get_tensor(str(divisor)).to(dtype=dtype)
118
119
return None
120
0 commit comments