Skip to content

Commit

Permalink
[test] Revert skipped argpack tests (spir-v backends only)
Browse files Browse the repository at this point in the history
ghstack-source-id: 1977e8243a22b415725e518179476cb88aff9917
Pull Request resolved: #8265
  • Loading branch information
listerily committed Jul 6, 2023
1 parent 47df793 commit bd30240
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions tests/python/test_argpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from tests import test_utils


@pytest.mark.skip(reason="Temporarily disabled argpack functionalities")
@test_utils.test()
@test_utils.test(arch=[ti.gles, ti.opengl, ti.vulkan, ti.metal, ti.dx11])
def test_argpack_basic():
pack_type = ti.types.argpack(a=ti.i32, b=bool, c=ti.f32)
pack1 = pack_type(a=1, b=False, c=2.1)
Expand All @@ -24,8 +23,7 @@ def foo(pack: pack_type) -> ti.f32:
assert foo(pack2) == test_utils.approx(2 + 2.1, rel=1e-3)


@pytest.mark.skip(reason="Temporarily disabled argpack functionalities")
@test_utils.test()
@test_utils.test(arch=[ti.gles, ti.opengl, ti.vulkan, ti.metal, ti.dx11])
def test_argpack_multiple():
arr = ti.ndarray(dtype=ti.math.vec3, shape=(4, 4))
arr.fill([1.0, 2.0, 3.0])
Expand All @@ -43,8 +41,7 @@ def foo(p1: pack_type1, p2: pack_type2) -> ti.f32:
assert foo(pack1, pack2) == test_utils.approx(1 * 2.1 + 2.0, rel=1e-3)


@pytest.mark.skip(reason="Temporarily disabled argpack functionalities")
@test_utils.test()
@test_utils.test(arch=[ti.gles, ti.opengl, ti.vulkan, ti.metal, ti.dx11])
def test_argpack_nested():
arr = ti.ndarray(dtype=ti.math.vec3, shape=(4, 4))
arr.fill([1.0, 2.0, 3.0])
Expand All @@ -71,8 +68,7 @@ def h(x: pack_type) -> int:
assert h(pack) == 233


@pytest.mark.skip(reason="Temporarily disabled argpack functionalities")
@test_utils.test()
@test_utils.test(arch=[ti.gles, ti.opengl, ti.vulkan, ti.metal, ti.dx11])
def test_argpack_as_return():
pack_type = ti.types.argpack(a=ti.i32, b=bool)

Expand All @@ -85,17 +81,15 @@ def foo(pack: pack_type) -> pack_type:
foo()


@pytest.mark.skip(reason="Temporarily disabled argpack functionalities")
@test_utils.test()
@test_utils.test(arch=[ti.gles, ti.opengl, ti.vulkan, ti.metal, ti.dx11])
def test_argpack_as_struct_type_element():
with pytest.raises(ValueError, match="Invalid data type <ti.ArgPackType a=i32, b=u1>"):
pack_type = ti.types.argpack(a=ti.i32, b=bool)
struct_with_argpack_inside = ti.types.struct(element=pack_type)
print(struct_with_argpack_inside)


@pytest.mark.skip(reason="Temporarily disabled argpack functionalities")
@test_utils.test()
@test_utils.test(arch=[ti.gles, ti.opengl, ti.vulkan, ti.metal, ti.dx11])
def test_argpack_with_ndarray():
arr = ti.ndarray(dtype=ti.math.vec3, shape=(4, 4))
arr.fill([1.0, 2.0, 3.0])
Expand Down

0 comments on commit bd30240

Please sign in to comment.