If I have a buffer of type int8
, and I want to treat it as a buffer of int32
, what is the best way to do it? Right now, I do
x32 = tvm.decl_buffer(x8.shape, 'int32', 'name', x8.data,
x8.strides, x8.elem_offset, x8.scope,
x8.data_alignment, x8.offset_factor)
i.e. create a new buffer with the same parameters as before, but with a different type. This is just for prototyping (the shapes are incorrect, etc.), but I was wondering if there is a better way of doing it.
What I really want is to do x8.vload(0, 'int32x32')
, i.e. a load of a vector of i32
from a buffer of type int8
.