Skip to content

[SYCL][CUDA] Fix post merge errors from #9512 #9872

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

Merged
merged 1 commit into from
Jun 14, 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
4 changes: 1 addition & 3 deletions sycl/plugins/unified_runtime/ur/adapters/cuda/tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,20 @@
#include <exception>
#include <iostream>

#ifdef XPTI_ENABLE_INSTRUMENTATION
constexpr auto CUDA_CALL_STREAM_NAME = "sycl.experimental.cuda.call";
constexpr auto CUDA_DEBUG_STREAM_NAME = "sycl.experimental.cuda.debug";

thread_local uint64_t CallCorrelationID = 0;
thread_local uint64_t DebugCorrelationID = 0;

#ifdef XPTI_ENABLE_INSTRUMENTATION
static xpti_td *GCallEvent = nullptr;
static xpti_td *GDebugEvent = nullptr;
#endif // XPTI_ENABLE_INSTRUMENTATION

constexpr auto GVerStr = "0.1";
constexpr int GMajVer = 0;
constexpr int GMinVer = 1;

#ifdef XPTI_ENABLE_INSTRUMENTATION
static void cuptiCallback(void *, CUpti_CallbackDomain, CUpti_CallbackId CBID,
const void *CBData) {
if (xptiTraceEnabled()) {
Expand Down
22 changes: 11 additions & 11 deletions sycl/plugins/unified_runtime/ur/adapters/cuda/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

/// USM: Implements USM Host allocations using CUDA Pinned Memory
/// https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#page-locked-host-memory
UR_APIEXPORT ur_result_t UR_APICALL
urUSMHostAlloc(ur_context_handle_t hContext, const ur_usm_desc_t *pUSMDesc,
ur_usm_pool_handle_t pool, size_t size, void **ppMem) {
UR_APIEXPORT ur_result_t UR_APICALL urUSMHostAlloc(
ur_context_handle_t hContext, const ur_usm_desc_t *pUSMDesc,
[[maybe_unused]] ur_usm_pool_handle_t pool, size_t size, void **ppMem) {
UR_ASSERT(ppMem, UR_RESULT_ERROR_INVALID_NULL_POINTER);
UR_ASSERT(hContext, UR_RESULT_ERROR_INVALID_NULL_HANDLE);

Expand Down Expand Up @@ -55,10 +55,10 @@ urUSMHostAlloc(ur_context_handle_t hContext, const ur_usm_desc_t *pUSMDesc,

/// USM: Implements USM device allocations using a normal CUDA device pointer
///
UR_APIEXPORT ur_result_t UR_APICALL
urUSMDeviceAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,
const ur_usm_desc_t *pUSMDesc, ur_usm_pool_handle_t pool,
size_t size, void **ppMem) {
UR_APIEXPORT ur_result_t UR_APICALL urUSMDeviceAlloc(
ur_context_handle_t hContext, ur_device_handle_t hDevice,
const ur_usm_desc_t *pUSMDesc, [[maybe_unused]] ur_usm_pool_handle_t pool,
size_t size, void **ppMem) {
UR_ASSERT(ppMem, UR_RESULT_ERROR_INVALID_NULL_POINTER);
UR_ASSERT(hContext, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
UR_ASSERT(hDevice, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
Expand Down Expand Up @@ -92,10 +92,10 @@ urUSMDeviceAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,

/// USM: Implements USM Shared allocations using CUDA Managed Memory
///
UR_APIEXPORT ur_result_t UR_APICALL
urUSMSharedAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,
const ur_usm_desc_t *pUSMDesc, ur_usm_pool_handle_t pool,
size_t size, void **ppMem) {
UR_APIEXPORT ur_result_t UR_APICALL urUSMSharedAlloc(
ur_context_handle_t hContext, ur_device_handle_t hDevice,
const ur_usm_desc_t *pUSMDesc, [[maybe_unused]] ur_usm_pool_handle_t pool,
size_t size, void **ppMem) {
UR_ASSERT(ppMem, UR_RESULT_ERROR_INVALID_NULL_POINTER);
UR_ASSERT(hContext, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
UR_ASSERT(hDevice, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
Expand Down