Code
|
mask = torch.zeros(tensor.shape, dtype=tensor.dtype) |
input tensor is float, so mask is float type. but "SrNMTensor" initialization with parameters "mask" and call to_sparse_sr_nm
|
self.to_sparse_sr_nm(dense_.cpu().to(dtype=torch.float32), mask_) |
And it will call c function with mask int type
|
extern "C" void func2({dtype}* sparse, int* masks, {dtype}* hA_values, int *hA_columns, int *hA_metadata){{ |
this is a bug.
Code
venom/end2end/gpt2_pytorch.py
Line 74 in 8ddaf38
input tensor is float, so mask is float type. but "SrNMTensor" initialization with parameters "mask" and call to_sparse_sr_nm
venom/end2end/grouped_nmv_tensor.py
Line 692 in 8ddaf38
And it will call c function with mask int type
venom/end2end/grouped_nmv_tensor.py
Line 529 in 8ddaf38
this is a bug.