Make compute_type a dtype object
@@ -466,6 +466,7 @@ cdef _get_contraction_compute_type(a_dtype, b_dtype, out_dtype, compute_dtype):
if compute_dtype is None:
compute_type = cupy.core.get_compute_type(out_dtype)
else:
+ compute_dtype = numpy.dtype(compute_dtype)
if compute_dtype.char == 'e':
compute_type = core.COMPUTE_TYPE_FP16
elif compute_dtype.char in 'fF':
