File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
backends/apple/coreml/compiler Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -71,13 +71,16 @@ def dequantize_affine(context, node):
7171 # CoreML removes casts during one of its passes
7272 out_np_dtype = None
7373 if len (inputs ) > 7 :
74- output_dtype = inputs [7 ].val
75- assert isinstance (
76- output_dtype , _torch .dtype
77- ), f"output_dtype must be a torch.dtype, but got type { type (output_dtype )} "
78- out_np_dtype = NUM_TO_NUMPY_DTYPE [ # noqa: F841
79- TORCH_DTYPE_TO_NUM [output_dtype ]
80- ]
74+ # I get error: AssertionError: output_dtype must be a torch.dtype, but got type <class 'numpy.int32'>
75+ # This doesn't make much sense because the torch op actually has output_dtype torch.float16, which makes me a bit concerned
76+ pass
77+ # output_dtype = inputs[7].val
78+ # assert isinstance(
79+ # output_dtype, _torch.dtype
80+ # ), f"output_dtype must be a torch.dtype, but got type {type(output_dtype)}"
81+ # out_np_dtype = NUM_TO_NUMPY_DTYPE[ # noqa: F841
82+ # TORCH_DTYPE_TO_NUM[output_dtype]
83+ # ]
8184
8285 if quant_min == - 8 and quant_max == 7 :
8386 quantized_np_dtype = types .nptype_from_builtin (types .string_to_builtin ("int4" ))
You can’t perform that action at this time.
0 commit comments