Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Enable cfg_optimization in all tests #2106

Merged
merged 5 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/python/test_bit_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_1D_bit_array():
ci1 = ti.type_factory_.get_custom_int_type(1, False)

Expand All @@ -28,7 +28,7 @@ def verify_val():
verify_val()


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_2D_bit_array():
ci1 = ti.type_factory_.get_custom_int_type(1, False)

Expand Down
11 changes: 4 additions & 7 deletions tests/python/test_bit_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_simple_array():
ci13 = ti.type_factory_.get_custom_int_type(13, True)
cu19 = ti.type_factory_.get_custom_int_type(19, False)
Expand Down Expand Up @@ -36,7 +36,7 @@ def verify_val():
verify_val.__wrapped__()


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_custom_int_load_and_store():
ci13 = ti.type_factory_.get_custom_int_type(13, True)
cu14 = ti.type_factory_.get_custom_int_type(14, False)
Expand Down Expand Up @@ -77,7 +77,7 @@ def verify_val(idx: ti.i32):
verify_val.__wrapped__(idx)


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_custom_int_full_struct():
cit = ti.type_factory_.get_custom_int_type(32, True)
x = ti.field(dtype=cit)
Expand Down Expand Up @@ -108,10 +108,7 @@ def varify_val2():
def test_bit_struct():
def test_single_bit_struct(physical_type, compute_type, custom_bits,
test_case):
ti.init(arch=ti.cpu,
debug=True,
print_ir=False,
cfg_optimization=False)
ti.init(arch=ti.cpu, debug=True, print_ir=False)

cit1 = ti.type_factory_.get_custom_int_type(custom_bits[0], True,
compute_type)
Expand Down
4 changes: 2 additions & 2 deletions tests/python/test_custom_float.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pytest import approx


@ti.test(require=ti.extension.quant, cfg_optimization=False)
@ti.test(require=ti.extension.quant)
def test_custom_float():
ci13 = ti.type_factory_.get_custom_int_type(13, True)
cft = ti.type_factory_.get_custom_float_type(ci13, ti.f32.get_ptr(), 0.1)
Expand All @@ -25,7 +25,7 @@ def foo():
assert x[None] == approx(0.7)


@ti.test(require=ti.extension.quant, cfg_optimization=False)
@ti.test(require=ti.extension.quant)
def test_custom_matrix_rotation():
ci16 = ti.type_factory_.get_custom_int_type(16, True)
cft = ti.type_factory_.get_custom_float_type(ci16, ti.f32.get_ptr(),
Expand Down
6 changes: 3 additions & 3 deletions tests/python/test_custom_type_atomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pytest import approx


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_custom_int_atomics():
ci13 = ti.type_factory_.get_custom_int_type(13, True)
ci5 = ti.type_factory_.get_custom_int_type(5, True)
Expand Down Expand Up @@ -36,7 +36,7 @@ def foo():
assert z[None] == 3


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_custom_int_atomics_b64():
ci13 = ti.type_factory_.get_custom_int_type(13, True)

Expand All @@ -60,7 +60,7 @@ def foo():
assert x[2] == 315


@ti.test(require=ti.extension.quant, debug=True, cfg_optimization=False)
@ti.test(require=ti.extension.quant, debug=True)
def test_custom_float_atomics():
ci13 = ti.type_factory_.get_custom_int_type(13, True)
ci19 = ti.type_factory_.get_custom_int_type(19, False)
Expand Down