-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add device code test/Update ext spec with note
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
- Loading branch information
Showing
3 changed files
with
24 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// RUN: %clangxx -fsycl -fsycl-device-only %if cuda %{ -fsycl-targets=nvptx64-nvidia-cuda %} %if hip-amd %{ -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx90a %} -S -emit-llvm %s -o - | FileCheck %s %if cuda || hip-amd %{ --check-prefixes=CHECK-CONST %} | ||
|
||
// Tests that const T device_global uses const address space for cuda/hip | ||
|
||
#include <sycl/sycl.hpp> | ||
|
||
using namespace sycl; | ||
using namespace sycl::ext::oneapi::experimental; | ||
|
||
device_global<const int> DeviceGlobalVar; | ||
|
||
int main() { | ||
queue Q; | ||
Q.single_task([]() { | ||
// CHECK-CONST: (ptr addrspace(4) @DeviceGlobalVar | ||
volatile int ReadVal = DeviceGlobalVar; | ||
}); | ||
return 0; | ||
} |