Skip to content

Commit

Permalink
reviewer feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cperkinsintel committed Mar 5, 2024
1 parent f7fd7ed commit fc6d2aa
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,14 @@ bool OpenCLC_Supports_Extension(
}

std::string OpenCLC_Profile(uint32_t IPVersion) {
// Note: seems to have \n\n amended
try {
std::string result = InvokeOclocQuery(IPVersion, "CL_DEVICE_PROFILE");
// NOTE: result has \n\n amended. Clean it up.
// TODO: remove this once the ocloc query is fixed.
while (result.back() == '\n') {
result.pop_back();
}

return result;
} catch (sycl::exception &) {
return "";
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/kernel_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: ocloc
// REQUIRES: ocloc && (opencl || level_zero)

// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/KernelCompiler/opencl_capabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: ocloc
// REQUIRES: ocloc && (opencl || level_zero)

// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
Expand Down
5 changes: 3 additions & 2 deletions sycl/test-e2e/KernelCompiler/opencl_queries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//

// REQUIRES: ocloc
// REQUIRES: ocloc && (opencl || level_zero)

// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
Expand Down Expand Up @@ -41,7 +41,8 @@ int main() {
}

// no supported devices support EMBEDDED_PROFILE at this time.
assert(d.ext_oneapi_cl_profile().find("FULL_PROFILE") == 0);
assert(d.ext_oneapi_cl_profile() == "FULL_PROFILE" &&
"unexpected cl_profile");

assert(syclex::opencl_c_1_0.major == 1 && syclex::opencl_c_1_0.minor == 0 && syclex::opencl_c_1_0.patch == 0);
assert(syclex::opencl_c_1_1.major == 1 && syclex::opencl_c_1_1.minor == 1 && syclex::opencl_c_1_1.patch == 0);
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/KernelCompiler/opencl_queries_negative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//

// Run on CUDA, HIP, and other devices that don't support the kernel_compiler
// REQUIRES: !ocloc
// Test when we don't have ocloc (eg CUDA, HIP, etc)
// REQUIRES: !ocloc && !opencl && !level_zero

// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
Expand Down

0 comments on commit fc6d2aa

Please sign in to comment.