Skip to content
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
52 changes: 26 additions & 26 deletions sycl/plugins/unified_runtime/ur/adapters/cuda/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferCreateExp(
(void)hDevice;
(void)pCommandBufferDesc;
(void)phCommandBuffer;
sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferRetainExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
(void)hCommandBuffer;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
(void)hCommandBuffer;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferFinalizeExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
(void)hCommandBuffer;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -68,8 +68,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -86,8 +86,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMemcpyUSMExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -107,8 +107,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMembufferCopyExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -134,8 +134,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMembufferCopyRectExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -155,8 +155,8 @@ ur_result_t UR_APICALL urCommandBufferAppendMembufferWriteExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -175,8 +175,8 @@ ur_result_t UR_APICALL urCommandBufferAppendMembufferReadExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -203,8 +203,8 @@ ur_result_t UR_APICALL urCommandBufferAppendMembufferWriteRectExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand Down Expand Up @@ -232,8 +232,8 @@ ur_result_t UR_APICALL urCommandBufferAppendMembufferReadRectExp(
(void)pSyncPointWaitList;
(void)pSyncPoint;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

Expand All @@ -247,7 +247,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp(
(void)phEventWaitList;
(void)phEvent;

sycl::detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
detail::ur::die("Experimental Command-buffer feature is not "
"implemented for CUDA adapter.");
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
6 changes: 3 additions & 3 deletions sycl/plugins/unified_runtime/ur/adapters/cuda/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ std::string getCudaVersionString() {
return stream.str();
}

void sycl::detail::ur::die(const char *Message) {
void detail::ur::die(const char *Message) {
std::cerr << "ur_die: " << Message << std::endl;
std::terminate();
}

void sycl::detail::ur::assertion(bool Condition, const char *Message) {
void detail::ur::assertion(bool Condition, const char *Message) {
if (!Condition)
die(Message);
}

void sycl::detail::ur::cuPrint(const char *Message) {
void detail::ur::cuPrint(const char *Message) {
std::cerr << "ur_print: " << Message << std::endl;
}

Expand Down
5 changes: 0 additions & 5 deletions sycl/plugins/unified_runtime/ur/adapters/cuda/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#pragma once

#include <cuda.h>
#include <sycl/detail/defines.hpp>
#include <ur/ur.hpp>

ur_result_t mapErrorUR(CUresult Result);
Expand Down Expand Up @@ -37,8 +36,6 @@ extern thread_local char ErrorMessage[MaxMessageSize];
ur_result_t ErrorCode);

/// ------ Error handling, matching OpenCL plugin semantics.
namespace sycl {
__SYCL_INLINE_VER_NAMESPACE(_V1) {
namespace detail {
namespace ur {

Expand All @@ -55,5 +52,3 @@ void assertion(bool Condition, const char *Message = nullptr);

} // namespace ur
} // namespace detail
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
} // namespace sycl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urContextGetInfo(
}
case UR_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES: {
int Major = 0;
sycl::detail::ur::assertion(
detail::ur::assertion(
cuDeviceGetAttribute(&Major,
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR,
hContext->getDevice()->get()) == CUDA_SUCCESS);
Expand Down
Loading