Skip to content

Commit

Permalink
skip CLANG test casts between double and half for now (tinygrad#4609)
Browse files Browse the repository at this point in the history
start breaking after github CI image update
  • Loading branch information
chenyuxyz authored May 15, 2024
1 parent 8694eeb commit 3c11ca4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_dtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import torch
from typing import Any, List
from tinygrad.helpers import getenv, DEBUG
from tinygrad.helpers import getenv, DEBUG, CI
from tinygrad.dtype import DType, DTYPES_DICT, ImageDType, PtrDType, least_upper_float, least_upper_dtype
from tinygrad import Device, Tensor, dtypes
from hypothesis import given, settings, strategies as strat
Expand Down Expand Up @@ -47,6 +47,9 @@ def _test_cast(a:Tensor, target_dtype:DType):
if target_dtype == dtypes.half and Device.DEFAULT == "PYTHON":
# TODO: struct.pack cannot pack value > 65504 (max of half) into e format
a = (a > 65504).where(65504, a)
if CI and Device.DEFAULT == "CLANG" and (target_dtype, a.dtype) in [(dtypes.double, dtypes.half), (dtypes.half, dtypes.double)]:
# TODO: cast between double and half are broken https://github.com/tinygrad/tinygrad/issues/4084
return

_test_op(lambda: a.cast(target_dtype), target_dtype, list(a.numpy().astype(target_dtype.np)))
def _test_bitcast(a:Tensor, target_dtype:DType, target=None):
Expand Down

0 comments on commit 3c11ca4

Please sign in to comment.