Skip to content

Add bool dtype support to slangpy native Tensor #899

@mkeshavaNV

Description

@mkeshavaNV

torch.bool tensors now work with TensorView (PR #884 ), but slangpy's native Tensor type does not support bool. Tensor.from_numpy(device, np.array([...], dtype=np.bool_)) fails with "Unsupported numpy dtype bool".

Root cause: The _numpy_to_sgl mapping in slangpy/reflection/lookup.py (line 16-28) is missing a "bool": ST.bool entry. The reverse mapping _sgl_to_numpy also needs ST.bool: "bool".

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions