Skip to content

Commit db68c4d

Browse files
committed
few modifications.
Signed-off-by: rbegam <[email protected]>
1 parent 3dc592a commit db68c4d

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ namespace pi {
289289
std::terminate();
290290
}
291291

292+
// Reports error messages
293+
void cuPrint(const char *Message) {
294+
std::cerr << "pi_print: " << Message << std::endl;
295+
}
296+
292297
void assertion(bool Condition, const char *Message) {
293298
if (!Condition)
294299
die(Message);
@@ -2649,7 +2654,7 @@ pi_result cuda_piclProgramCreateWithSource(pi_context context, pi_uint32 count,
26492654
const char **strings,
26502655
const size_t *lengths,
26512656
pi_program *program) {
2652-
cl::sycl::detail::pi::die("cuda_piclProgramCreateWithSource not implemented");
2657+
cl::sycl::detail::pi::cuPrint("cuda_piclProgramCreateWithSource not implemented");
26532658
return PI_INVALID_OPERATION;
26542659
}
26552660

sycl/source/detail/program_impl.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <detail/spec_constant_impl.hpp>
1818

1919
#include <algorithm>
20-
#include <string>
2120
#include <fstream>
2221
#include <list>
2322
#include <memory>
@@ -27,21 +26,6 @@ __SYCL_INLINE_NAMESPACE(cl) {
2726
namespace sycl {
2827
namespace detail {
2928

30-
inline const std::string GetBackendString(cl::sycl::backend backend) {
31-
switch (backend) {
32-
#define PI_BACKEND_STR(backend_name) \
33-
case cl::sycl::backend::backend_name: \
34-
return #backend_name
35-
PI_BACKEND_STR(cuda);
36-
PI_BACKEND_STR(host);
37-
PI_BACKEND_STR(opencl);
38-
PI_BACKEND_STR(level_zero);
39-
#undef PI_BACKEND_STR
40-
default:
41-
return "Unknown Plugin";
42-
}
43-
}
44-
4529
program_impl::program_impl(ContextImplPtr Context,
4630
const property_list &PropList)
4731
: program_impl(Context, Context->get_info<info::context::devices>(),
@@ -380,8 +364,7 @@ void program_impl::create_cl_program_with_source(const string_class &Source) {
380364

381365
if (Err == PI_INVALID_OPERATION) {
382366
throw feature_not_supported(
383-
"program::compile_with_source is not supported in" +
384-
GetBackendString(Plugin.getBackend()),
367+
"program::compile_with_source is not supported",
385368
PI_INVALID_OPERATION);
386369
}
387370
}

0 commit comments

Comments
 (0)