@@ -466,7 +466,7 @@ class __SYCL_EXPORT handler {
466
466
// / \param Queue is a SYCL queue.
467
467
// / \param IsHost indicates if this handler is created for SYCL host device.
468
468
// / TODO: Unused. Remove with ABI break.
469
- handler (std::shared_ptr<detail::queue_impl> Queue, bool IsHost );
469
+ handler (std::shared_ptr<detail::queue_impl> Queue, bool /* Unused */ );
470
470
471
471
// / Constructs SYCL handler from the associated queue and the submission's
472
472
// / primary and secondary queue.
@@ -476,20 +476,20 @@ class __SYCL_EXPORT handler {
476
476
// / \param PrimaryQueue is the primary SYCL queue of the submission.
477
477
// / \param SecondaryQueue is the secondary SYCL queue of the submission. This
478
478
// / is null if no secondary queue is associated with the submission.
479
- // / \param IsHost indicates if this handler is created for SYCL host device.
480
479
// / TODO: Unused. Remove with ABI break.
481
480
handler (std::shared_ptr<detail::queue_impl> Queue,
482
481
std::shared_ptr<detail::queue_impl> PrimaryQueue,
483
- std::shared_ptr<detail::queue_impl> SecondaryQueue, bool IsHost);
482
+ std::shared_ptr<detail::queue_impl> SecondaryQueue,
483
+ bool /* Unused */ );
484
484
485
485
// / Constructs SYCL handler from queue.
486
486
// /
487
487
// / \param Queue is a SYCL queue.
488
488
// / \param IsHost indicates if this handler is created for SYCL host device.
489
489
// / \param CallerNeedsEvent indicates if the event resulting from this handler
490
490
// / is needed by the caller.
491
- handler (std::shared_ptr<detail::queue_impl> Queue, bool IsHost,
492
- bool CallerNeedsEvent);
491
+ handler (std::shared_ptr<detail::queue_impl> Queue,
492
+ bool /* ABI break: remove */ , bool CallerNeedsEvent);
493
493
494
494
// / Constructs SYCL handler from the associated queue and the submission's
495
495
// / primary and secondary queue.
@@ -504,8 +504,8 @@ class __SYCL_EXPORT handler {
504
504
// / is needed by the caller.
505
505
handler (std::shared_ptr<detail::queue_impl> Queue,
506
506
std::shared_ptr<detail::queue_impl> PrimaryQueue,
507
- std::shared_ptr<detail::queue_impl> SecondaryQueue, bool IsHost,
508
- bool CallerNeedsEvent);
507
+ std::shared_ptr<detail::queue_impl> SecondaryQueue,
508
+ bool /* ABI break: remove */ , bool CallerNeedsEvent);
509
509
510
510
// / Constructs SYCL handler from Graph.
511
511
// /
@@ -644,7 +644,7 @@ class __SYCL_EXPORT handler {
644
644
~handler () = default ;
645
645
646
646
// TODO: Private and unusued. Remove when ABI break is allowed.
647
- bool is_host () { return MIsHost ; }
647
+ bool is_host () { return false ; }
648
648
649
649
#ifdef __SYCL_DEVICE_ONLY__
650
650
// In device compilation accessor isn't inherited from host base classes, so
@@ -923,12 +923,6 @@ class __SYCL_EXPORT handler {
923
923
detail::KernelLambdaHasKernelHandlerArgT<KernelType,
924
924
LambdaArgType>::value;
925
925
926
- if (IsCallableWithKernelHandler && MIsHost) {
927
- throw sycl::feature_not_supported (
928
- " kernel_handler is not yet supported by host device." ,
929
- PI_ERROR_INVALID_OPERATION);
930
- }
931
-
932
926
KernelType *KernelPtr =
933
927
ResetHostKernel<KernelType, LambdaArgType, Dims>(KernelFunc);
934
928
@@ -1077,8 +1071,7 @@ class __SYCL_EXPORT handler {
1077
1071
std::enable_if_t <(DimSrc > 0 ) && (DimDst > 0 ), bool >
1078
1072
copyAccToAccHelper (accessor<TSrc, DimSrc, ModeSrc, TargetSrc, IsPHSrc> Src,
1079
1073
accessor<TDst, DimDst, ModeDst, TargetDst, IsPHDst> Dst) {
1080
- if (!MIsHost &&
1081
- IsCopyingRectRegionAvailable (Src.get_range (), Dst.get_range ()))
1074
+ if (IsCopyingRectRegionAvailable (Src.get_range (), Dst.get_range ()))
1082
1075
return false ;
1083
1076
1084
1077
range<1 > LinearizedRange (Src.size ());
@@ -1100,23 +1093,19 @@ class __SYCL_EXPORT handler {
1100
1093
// /
1101
1094
// / \param Src is a source SYCL accessor.
1102
1095
// / \param Dst is a destination SYCL accessor.
1096
+ // ABI break: to remove whole method
1103
1097
template <typename TSrc, int DimSrc, access::mode ModeSrc,
1104
1098
access::target TargetSrc, typename TDst, int DimDst,
1105
1099
access::mode ModeDst, access::target TargetDst,
1106
1100
access::placeholder IsPHSrc, access::placeholder IsPHDst>
1107
1101
std::enable_if_t <DimSrc == 0 || DimDst == 0 , bool >
1108
- copyAccToAccHelper (accessor<TSrc, DimSrc, ModeSrc, TargetSrc, IsPHSrc> Src,
1109
- accessor<TDst, DimDst, ModeDst, TargetDst, IsPHDst> Dst) {
1110
- if (!MIsHost)
1111
- return false ;
1112
-
1113
- single_task<__copyAcc2Acc<TSrc, DimSrc, ModeSrc, TargetSrc, TDst, DimDst,
1114
- ModeDst, TargetDst, IsPHSrc, IsPHDst>>(
1115
- [=]() { *(Dst.get_pointer ()) = *(Src.get_pointer ()); });
1116
- return true ;
1102
+ copyAccToAccHelper (accessor<TSrc, DimSrc, ModeSrc, TargetSrc, IsPHSrc>,
1103
+ accessor<TDst, DimDst, ModeDst, TargetDst, IsPHDst>) {
1104
+ return false ;
1117
1105
}
1118
1106
1119
1107
#ifndef __SYCL_DEVICE_ONLY__
1108
+ // ABI break: to remove whole method
1120
1109
// / Copies the content of memory object accessed by Src into the memory
1121
1110
// / pointed by Dst.
1122
1111
// /
@@ -1136,6 +1125,7 @@ class __SYCL_EXPORT handler {
1136
1125
});
1137
1126
}
1138
1127
1128
+ // ABI break: to remove whole method
1139
1129
// / Copies 1 element accessed by 0-dimensional accessor Src into the memory
1140
1130
// / pointed by Dst.
1141
1131
// /
@@ -1153,6 +1143,7 @@ class __SYCL_EXPORT handler {
1153
1143
});
1154
1144
}
1155
1145
1146
+ // ABI break: to remove whole method
1156
1147
// / Copies the memory pointed by Src into the memory accessed by Dst.
1157
1148
// /
1158
1149
// / \param Src is a pointer to source memory.
@@ -1170,6 +1161,7 @@ class __SYCL_EXPORT handler {
1170
1161
});
1171
1162
}
1172
1163
1164
+ // ABI break: to remove whole method
1173
1165
// / Copies 1 element pointed by Src to memory accessed by 0-dimensional
1174
1166
// / accessor Dst.
1175
1167
// /
@@ -2282,7 +2274,7 @@ class __SYCL_EXPORT handler {
2282
2274
MNDRDesc.set (range<1 >{1 });
2283
2275
MKernel = detail::getSyclObjImpl (std::move (Kernel));
2284
2276
setType (detail::CG::Kernel);
2285
- if (!MIsHost && ! lambdaAndKernelHaveEqualName<NameT>()) {
2277
+ if (!lambdaAndKernelHaveEqualName<NameT>()) {
2286
2278
extractArgsAndReqs ();
2287
2279
MKernelName = getKernelName ();
2288
2280
} else
@@ -2319,7 +2311,7 @@ class __SYCL_EXPORT handler {
2319
2311
MKernel = detail::getSyclObjImpl (std::move (Kernel));
2320
2312
setType (detail::CG::Kernel);
2321
2313
setNDRangeUsed (false );
2322
- if (!MIsHost && ! lambdaAndKernelHaveEqualName<NameT>()) {
2314
+ if (!lambdaAndKernelHaveEqualName<NameT>()) {
2323
2315
extractArgsAndReqs ();
2324
2316
MKernelName = getKernelName ();
2325
2317
} else
@@ -2359,7 +2351,7 @@ class __SYCL_EXPORT handler {
2359
2351
MKernel = detail::getSyclObjImpl (std::move (Kernel));
2360
2352
setType (detail::CG::Kernel);
2361
2353
setNDRangeUsed (false );
2362
- if (!MIsHost && ! lambdaAndKernelHaveEqualName<NameT>()) {
2354
+ if (!lambdaAndKernelHaveEqualName<NameT>()) {
2363
2355
extractArgsAndReqs ();
2364
2356
MKernelName = getKernelName ();
2365
2357
} else
@@ -2398,7 +2390,7 @@ class __SYCL_EXPORT handler {
2398
2390
MKernel = detail::getSyclObjImpl (std::move (Kernel));
2399
2391
setType (detail::CG::Kernel);
2400
2392
setNDRangeUsed (true );
2401
- if (!MIsHost && ! lambdaAndKernelHaveEqualName<NameT>()) {
2393
+ if (!lambdaAndKernelHaveEqualName<NameT>()) {
2402
2394
extractArgsAndReqs ();
2403
2395
MKernelName = getKernelName ();
2404
2396
} else
@@ -2725,14 +2717,6 @@ class __SYCL_EXPORT handler {
2725
2717
" Invalid accessor target for the copy method." );
2726
2718
static_assert (isValidModeForSourceAccessor (AccessMode),
2727
2719
" Invalid accessor mode for the copy method." );
2728
- #ifndef __SYCL_DEVICE_ONLY__
2729
- if (MIsHost) {
2730
- // TODO: Temporary implementation for host. Should be handled by memory
2731
- // manager.
2732
- copyAccToPtrHost (Src, Dst);
2733
- return ;
2734
- }
2735
- #endif
2736
2720
setType (detail::CG::CopyAccToPtr);
2737
2721
2738
2722
detail::AccessorBaseHost *AccBase = (detail::AccessorBaseHost *)&Src;
@@ -2769,14 +2753,7 @@ class __SYCL_EXPORT handler {
2769
2753
" Invalid accessor mode for the copy method." );
2770
2754
// TODO: Add static_assert with is_device_copyable when vec is
2771
2755
// device-copyable.
2772
- #ifndef __SYCL_DEVICE_ONLY__
2773
- if (MIsHost) {
2774
- // TODO: Temporary implementation for host. Should be handled by memory
2775
- // manager.
2776
- copyPtrToAccHost (Src, Dst);
2777
- return ;
2778
- }
2779
- #endif
2756
+
2780
2757
setType (detail::CG::CopyPtrToAcc);
2781
2758
2782
2759
detail::AccessorBaseHost *AccBase = (detail::AccessorBaseHost *)&Dst;
@@ -2890,8 +2867,6 @@ class __SYCL_EXPORT handler {
2890
2867
fill (accessor<T, Dims, AccessMode, AccessTarget, IsPlaceholder, PropertyListT>
2891
2868
Dst,
2892
2869
const T &Pattern) {
2893
- assert (!MIsHost && " fill() should no longer be callable on a host device." );
2894
-
2895
2870
if (Dst.is_placeholder ())
2896
2871
checkIfPlaceholderIsBoundToHandler (Dst);
2897
2872
@@ -3429,7 +3404,7 @@ class __SYCL_EXPORT handler {
3429
3404
// / Storage for the CG created when handling graph nodes added explicitly.
3430
3405
std::unique_ptr<detail::CG> MGraphNodeCG;
3431
3406
3432
- bool MIsHost = false ;
3407
+ bool MIsHost = false ; // ABI break: to remove
3433
3408
3434
3409
detail::code_location MCodeLoc = {};
3435
3410
bool MIsFinalized = false ;
0 commit comments