Closed leofang closed 3 years ago
likely complex64 -> type_code = 5, bits=64, lanes=1
is the right approach, so that we can use lanes for vectorized types later
Thanks, @tqchen! Both CuPy (https://github.com/cupy/cupy/pull/5045) and PyTorch (https://github.com/pytorch/pytorch/pull/55365) will follow this convention.
@leofang can you send a PR to dlpack.h to clarify?
@tqchen this is already a PR 😂
oops, sorry. Thanks @leofang
haha thanks @tqchen
Based on the ongoing discussion in https://github.com/pytorch/pytorch/pull/55365, we think it's best to clarify the expectation for complex numbers. There could be two legit ways to construct them:
or
While the latter is natural if one considers complex64=float2 (a 2-vector of floats), the former is natural to stress we are dealing with single datatype, not a compound/vector one.
cc: @rgommers @emcastillo