llvmir support for bool <-> float casting (#1492)

This commit is contained in:
geohotstan
2023-08-09 10:12:52 -07:00
committed by GitHub
parent 351684395c
commit 07b79f210f
3 changed files with 6 additions and 6 deletions

View File

@@ -143,5 +143,9 @@ class TestInt32Dtype(unittest.TestCase):
@unittest.skipIf(Device.DEFAULT == "WEBGPU", "webgpu does not support int64")
def test_int32_upcast_int64(self): _test_ops(a_dtype=dtypes.int32, b_dtype=dtypes.int64, target_dtype=dtypes.int64)
class TestBoolDtype(unittest.TestCase):
def test_casts_from_bool(self): _test_casts_from([0,1,1,0], source_dtype=dtypes.bool, target_dtypes=[dtypes.float32, dtypes.int32])
def test_casts_to_bool(self): _test_casts_to([0,1,1,0], source_dtypes=[dtypes.float32, dtypes.int32], target_dtype=dtypes.bool)
if __name__ == '__main__':
unittest.main()