Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around SYCL JIT compiler issues with static variables #4013

Conversation

masterleinad
Copy link
Contributor

We have been seeing SYCL compiler problems recently when using JIT mode. Compiling a debug version of the compiler revealed that these static variables are problematic and I don't see much of a reason for keeping them necessarily.
I still see

InvalidInstruction: Can't translate llvm instruction:
   fence seq_cst, !dbg !18492
 [Src: /scratch/llvm/llvm-spirv/lib/SPIRV/SPIRVWriter.cpp:1720  ]

but that seems to be a different issue (possibly to be tackled later).

@masterleinad masterleinad requested a review from nliber May 7, 2021 21:57
@@ -109,7 +109,7 @@ class SYCLInternal {
assert(m_mem);
assert(sizeof(T) == m_mem->size());

if constexpr (sycl::usm::alloc::device == kind)
if constexpr (sycl::usm::alloc::device == Kind)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this change coming from?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a public member

static constexpr sycl::usm::alloc kind = Kind;

which seems to have vanished.

Normally I try and expose all the (non-parameter-pack) template parameters via typedefs and static constexpr constants, as it is much easier when users of the class need to query them.

@crtrott crtrott merged commit b642a88 into kokkos:develop May 10, 2021
@masterleinad masterleinad deleted the sycl_static_jit_compiler_issues_workaround branch May 25, 2021 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants