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

Fix loss of L0-program creation from gh-1039 #1041

Merged
merged 1 commit into from
Jan 22, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion libsyclinterface/include/Config/dpctl_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#pragma once

/* Defined when dpctl was built with level zero program creation enabled. */
#cmakedefine DPCTL_ENABLE_L0_PROGRAM @DPCTL_ENABLE_L0_PROGRAM_CREATION@
#cmakedefine DPCTL_ENABLE_L0_PROGRAM_CREATION 1

#define __SYCL_COMPILER_VERSION_REQUIRED 20221201L

Expand Down
12 changes: 6 additions & 6 deletions libsyclinterface/source/dpctl_sycl_kernel_bundle_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#endif
#include <sstream>

#ifdef DPCTL_ENABLE_L0_PROGRAM
#ifdef DPCTL_ENABLE_L0_PROGRAM_CREATION
// Note: include ze_api.h before level_zero.hpp. Make sure clang-format does
// not reorder the includes.
// clang-format off
Expand Down Expand Up @@ -332,7 +332,7 @@ _GetKernel_ocl_impl(const kernel_bundle<bundle_state::executable> &kb,
}
}

#ifdef DPCTL_ENABLE_L0_PROGRAM
#ifdef DPCTL_ENABLE_L0_PROGRAM_CREATION

#ifdef __linux__
static const char *zeLoaderName = DPCTL_LIBZE_LOADER_FILENAME;
Expand Down Expand Up @@ -579,7 +579,7 @@ bool _HasKernel_ze_impl(const kernel_bundle<bundle_state::executable> &kb,
return false;
}

#endif /* #ifdef DPCTL_ENABLE_L0_PROGRAM */
#endif /* #ifdef DPCTL_ENABLE_L0_PROGRAM_CREATION */

} /* end of anonymous namespace */

Expand Down Expand Up @@ -619,7 +619,7 @@ DPCTLKernelBundle_CreateFromSpirv(__dpctl_keep const DPCTLSyclContextRef CtxRef,
length, CompileOpts);
break;
case backend::ext_oneapi_level_zero:
#ifdef DPCTL_ENABLE_L0_PROGRAM
#ifdef DPCTL_ENABLE_L0_PROGRAM_CREATION
KBRef = _CreateKernelBundleWithIL_ze_impl(*SyclCtx, *SyclDev, IL,
length, CompileOpts);
break;
Expand Down Expand Up @@ -701,7 +701,7 @@ DPCTLKernelBundle_GetKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
case sycl::backend::opencl:
return _GetKernel_ocl_impl(*SyclKB, KernelName);
case sycl::backend::ext_oneapi_level_zero:
#ifdef DPCTL_ENABLE_L0_PROGRAM
#ifdef DPCTL_ENABLE_L0_PROGRAM_CREATION
return _GetKernel_ze_impl(*SyclKB, KernelName);
#endif
default:
Expand Down Expand Up @@ -731,7 +731,7 @@ bool DPCTLKernelBundle_HasKernel(__dpctl_keep DPCTLSyclKernelBundleRef KBRef,
case sycl::backend::opencl:
return _HasKernel_ocl_impl(*SyclKB, KernelName);
case sycl::backend::ext_oneapi_level_zero:
#ifdef DPCTL_ENABLE_L0_PROGRAM
#ifdef DPCTL_ENABLE_L0_PROGRAM_CREATION
return _HasKernel_ze_impl(*SyclKB, KernelName);
#endif
default:
Expand Down