Skip to content

Commit a0ba532

Browse files
committed
Undisbale graph extensions
1 parent 15fabf6 commit a0ba532

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

sycl/include/sycl/ext/oneapi/experimental/enqueue_types.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,26 @@
88

99
#pragma once
1010

11+
#include <string>
12+
1113
namespace sycl {
1214
inline namespace _V1 {
1315
namespace ext::oneapi::experimental {
1416

1517
/// @brief Indicates the destination device for USM data to be prefetched to.
1618
enum class prefetch_type { device, host };
1719

20+
inline std::string prefetchTypeToString(prefetch_type value) {
21+
switch (value) {
22+
case sycl::ext::oneapi::experimental::prefetch_type::device:
23+
return "prefetch_type::device";
24+
case sycl::ext::oneapi::experimental::prefetch_type::host:
25+
return "prefetch_type::host";
26+
default:
27+
return "prefetch_type::unknown";
28+
}
29+
}
30+
1831
} // namespace ext::oneapi::experimental
1932
} // namespace _V1
2033
} // namespace sycl

sycl/source/detail/graph_impl.hpp

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,10 @@ class node_impl : public std::enable_shared_from_this<node_impl> {
245245
return createCGCopy<sycl::detail::CGPrefetchUSM>();
246246
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
247247
case sycl::detail::CGType::PrefetchUSMExp:
248-
throw sycl::exception(sycl::make_error_code(errc::feature_not_supported),
249-
"Prefetch as a part of the experimental enqueue "
250-
"function extension is currently not supported by "
251-
"SYCL Graph extension.");
252-
// return createCGCopy<sycl::detail::CGPrefetchUSMExp>();
248+
return createCGCopy<sycl::detail::CGPrefetchUSMExp>();
253249
#else
254250
case sycl::detail::CGType::PrefetchUSMExpD2H:
255-
throw sycl::exception(sycl::make_error_code(errc::feature_not_supported),
256-
"Prefetch from device to host is currently not "
257-
"supported by SYCL Graph extension.");
251+
return createCGCopy<sycl::detail::CGPrefetchUSMExpD2H>();
258252
#endif
259253
case sycl::detail::CGType::AdviseUSM:
260254
return createCGCopy<sycl::detail::CGAdviseUSM>();
@@ -649,6 +643,31 @@ class node_impl : public std::enable_shared_from_this<node_impl> {
649643
<< " Length: " << Prefetch->getLength() << "\\n";
650644
}
651645
break;
646+
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
647+
case sycl::detail::CGType::PrefetchUSMExp:
648+
Stream << "CGPrefetchUSMExp \\n";
649+
if (Verbose) {
650+
sycl::detail::CGPrefetchUSMExp *Prefetch =
651+
static_cast<sycl::detail::CGPrefetchUSMExp *>(MCommandGroup.get());
652+
Stream << "Dst: " << Prefetch->getDst()
653+
<< " Length: " << Prefetch->getLength() << " Type: "
654+
<< sycl::ext::oneapi::experimental::prefetchTypeToString(
655+
Prefetch->getPrefetchType())
656+
<< "\\n";
657+
}
658+
break;
659+
#else
660+
case sycl::detail::CGType::PrefetchUSMExpD2H:
661+
Stream << "CGPrefetchUSM (Experimental, Device-To-Host) \\n";
662+
if (Verbose) {
663+
sycl::detail::CGPrefetchUSMExpD2H *Prefetch =
664+
static_cast<sycl::detail::CGPrefetchUSMExpD2H *>(
665+
MCommandGroup.get());
666+
Stream << "Dst: " << Prefetch->getDst()
667+
<< " Length: " << Prefetch->getLength() << "\\n";
668+
}
669+
break;
670+
#endif
652671
case sycl::detail::CGType::AdviseUSM:
653672
Stream << "CGAdviseUSM \\n";
654673
if (Verbose) {

0 commit comments

Comments
 (0)