Skip to content

Commit

Permalink
Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao-bo committed Jun 16, 2022
1 parent 1084131 commit 6b92a52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion python/taichi/lang/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,10 @@ def _block_dim(dim):
def _block_dim_adaptive(block_dim_adaptive):
"""Enable/Disable backends set block_dim adaptively.
"""
get_runtime().prog.config.cpu_block_dim_adaptive = block_dim_adaptive
if get_runtime().prog.config.arch != cpu:
_logging.warn('Adaptive block_dim is supported on CPU backend only')
else:
get_runtime().prog.config.cpu_block_dim_adaptive = block_dim_adaptive


def loop_config(*,
Expand Down
2 changes: 1 addition & 1 deletion tests/python/test_parallel_range_for.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def foo() -> ti.i32:
assert foo() == 50


@test_utils.test()
@test_utils.test(arch=[ti.cpu])
def test_loop_config_block_dim_adaptive():
n = 4096
val = ti.field(ti.i32, shape=(n))
Expand Down

0 comments on commit 6b92a52

Please sign in to comment.