Skip to content

Commit

Permalink
[vulkan] Skip async_copy_chain and gpu_allocation_cache correctne…
Browse files Browse the repository at this point in the history
…ss tests on Windows (#8503)

* Skip `async_copy_chain` and `gpu_allocation_cache` correctness tests on
windows when running under Vulkan.  They'll only succeeed when run on
their own.

* Formatting

---------

Co-authored-by: Derek Gerstmann <[email protected]>
  • Loading branch information
derek-gerstmann and Derek Gerstmann authored Dec 9, 2024
1 parent 6b57a3b commit af2ffe4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions test/correctness/async_copy_chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ void make_pipeline(Func &A, Func &B) {
}

int main(int argc, char **argv) {
if (get_jit_target_from_environment().arch == Target::WebAssembly) {
Target target = get_jit_target_from_environment();
if (target.arch == Target::WebAssembly) {
printf("[SKIP] WebAssembly does not support async() yet.\n");
return 0;
}

if (target.has_feature(Target::Vulkan) && (target.os == Target::Windows)) {
printf("[SKIP] Skipping test for Vulkan on Windows ... fails unless run on its own!\n");
return 0;
}
// Make a list of extern pipeline stages (just copies) all async
// and connected by double buffers, then try various nestings of
// them. This is a stress test of the async extern storage folding
Expand Down
6 changes: 4 additions & 2 deletions test/correctness/gpu_allocation_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ int main(int argc, char **argv) {
printf("[SKIP] Skipping test for Vulkan on iOS/OSX (MoltenVK only allows 30 buffers to be allocated)!\n");
return 0;
}
if (target.has_feature(Target::Vulkan) && (target.os == Target::Windows)) {
printf("[SKIP] Skipping test for Vulkan on Windows ... fails unless run on its own!\n");
return 0;
}
if (target.has_feature(Target::WebGPU)) {
printf("[SKIP] Allocation cache not yet implemented for WebGPU.\n");
return 0;
Expand Down Expand Up @@ -158,13 +162,11 @@ int main(int argc, char **argv) {
test2(true, false);
test3(true, false);
});

double t2 = Tools::benchmark([&]() {
test1(false, false);
test2(false, false);
test3(false, false);
});

printf("Runtime with cache: %f\n"
"Without cache: %f\n",
t1, t2);
Expand Down

0 comments on commit af2ffe4

Please sign in to comment.