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 ffa404f commit ccca00aCopy full SHA for ccca00a
python/tvm/runtime/ndarray.py
@@ -176,6 +176,8 @@ def copyfrom(self, source_array):
176
if (not source_array.flags["C_CONTIGUOUS"]) or (
177
dtype == "bfloat16" or dtype != np_dtype_str
178
):
179
+ if dtype == "bfloat16":
180
+ source_array = np.frombuffer(source_array.tobytes(), "uint16")
181
source_array = np.ascontiguousarray(
182
source_array, dtype="uint16" if dtype == "bfloat16" else dtype
183
)
0 commit comments