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

[SYCL] Add tests for SYCL_RT_WARNING_LEVEL #753

Merged
merged 3 commits into from
Feb 10, 2022
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/Basic/build_log.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// REQUIRES: opencl || level_zero, gpu
// UNSUPPORTED: gpu-intel-dg1
//
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
// RUN: %GPU_RUN_PLACEHOLDER env SYCL_RT_WARNING_LEVEL=2 %t.out 2>&1 %GPU_CHECK_PLACEHOLDER

#include <sycl/sycl.hpp>

int main() {
sycl::queue Q{sycl::default_selector()};

auto *I = sycl::malloc_device<int>(1, Q);
Q.single_task([=]() { I[0] = 42; });

sycl::free(I, Q);

return 0;
}

// CHECK: The program was built for {{.*}} devices