Skip to content

float tensor pass into int* #6

Description

@ENXING

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions