Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL][CUDA] Unoptimized stream regression test #362

Merged
merged 2 commits into from
Jul 21, 2021
Merged
Changes from all 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
20 changes: 20 additions & 0 deletions SYCL/Regression/unoptimized_stream.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -O0 -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out

// NOTE: The libclc target used by the CUDA backend used to generate atomic load
// variants that were unsupported by NVPTX. Even if they were not used
// directly, sycl::stream and other operations would keep the invalid
// operations in when optimizations were disabled.

#include <sycl/sycl.hpp>

int main() {
sycl::queue q;
q.submit([&](sycl::handler &cgh) {
sycl::stream os(1024, 256, cgh);
cgh.single_task([=]() { os << "test"; });
});
return 0;
}