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

[llvm] [refactor] Link modules instead of cloning modules #5962

Merged
merged 9 commits into from
Sep 6, 2022
Prev Previous commit
Next Next commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
pre-commit-ci[bot] committed Sep 6, 2022
commit 96a578350b292b8246ee065513c190b1813a734f
15 changes: 10 additions & 5 deletions tests/python/test_offline_cache.py
Original file line number Diff line number Diff line change
@@ -309,11 +309,13 @@ def compute_y():
ti.init(arch=curr_arch,
enable_fallback=False,
**current_thread_ext_options())
assert added_files(curr_arch) == expected_num_cache_files(curr_arch, [1] * 8)
assert added_files(curr_arch) == expected_num_cache_files(
curr_arch, [1] * 8)
helper()

ti.reset()
assert added_files(curr_arch) == expected_num_cache_files(curr_arch, [1] * 8)
assert added_files(curr_arch) == expected_num_cache_files(
curr_arch, [1] * 8)


@pytest.mark.parametrize('curr_arch', supported_archs_offline_cache)
@@ -391,11 +393,13 @@ def helper():
ti.init(arch=curr_arch,
enable_fallback=False,
**current_thread_ext_options())
assert added_files(curr_arch) == expected_num_cache_files(curr_arch, [1] * 4)
assert added_files(curr_arch) == expected_num_cache_files(
curr_arch, [1] * 4)
helper()

ti.reset()
assert added_files(curr_arch) == expected_num_cache_files(curr_arch, [1] * 4)
assert added_files(curr_arch) == expected_num_cache_files(
curr_arch, [1] * 4)


@pytest.mark.parametrize('curr_arch', supported_archs_offline_cache)
@@ -493,7 +497,8 @@ def run_simple_kernels(max_size):
for kernel, args, get_res, num_offloads in simple_kernels_to_test:
assert kernel(*args) == test_utils.approx(get_res(*args))
if curr_arch in [ti.vulkan]:
sleep(1) # make sure the kernels are not used in the same second
sleep(
1) # make sure the kernels are not used in the same second

kernel_count = len(simple_kernels_to_test)
rem_factor = 1 if policy in [