Skip to content

Commit

Permalink
more feedback addressed
Browse files Browse the repository at this point in the history
Signed-off-by: Byoungro So <byoungro.so@intel.com>
  • Loading branch information
bso-intel committed Feb 9, 2024
1 parent ecb8ce9 commit 6f36028
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
1 change: 1 addition & 0 deletions sycl/include/sycl/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
detail::string_view PropertyName(typeid(Param).name());
std::vector<detail::string> Info = get_device_info_vector(PropertyName);
std::vector<std::string> Res;
Res.reserve(Info.size());
for (detail::string &Str : Info) {
Res.push_back(Str.c_str());
}
Expand Down
4 changes: 0 additions & 4 deletions sycl/include/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -905,11 +905,7 @@ class __SYCL_EXPORT handler {
extractArgsAndReqsFromLambda(reinterpret_cast<char *>(KernelPtr),
KI::getNumParams(), &KI::getParamDesc(0),
KI::isESIMD());
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
MKernelName = detail::string(KI::getName());
#else
MKernelName = KI::getName();
#endif
} else {
// In case w/o the integration header it is necessary to process
// accessors from the list(which are associated with this handler) as
Expand Down
8 changes: 1 addition & 7 deletions sycl/source/detail/queue_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,16 +825,10 @@ class queue_impl {
bool KernelUsesAssert = false;

if (IsKernel)
// Kernel only uses assert if it's non interop one
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
// Kernel only uses assert if it's non interop one
KernelUsesAssert = !(Handler.MKernel && Handler.MKernel->isInterop()) &&
ProgramManager::getInstance().kernelUsesAssert(
Handler.MKernelName.c_str());
#else
KernelUsesAssert =
!(Handler.MKernel && Handler.MKernel->isInterop()) &&
ProgramManager::getInstance().kernelUsesAssert(Handler.MKernelName);
#endif
finalizeHandler(Handler, Event);

(*PostProcess)(IsKernel, KernelUsesAssert, Event);
Expand Down
24 changes: 5 additions & 19 deletions sycl/source/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,13 @@ device::get_info() const {
#endif

// Explicit override. Not fulfilled by #include device_traits.def below.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
template <>
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
__SYCL_EXPORT device
device::get_info_internal<info::device::parent_device>() const {
// With ONEAPI_DEVICE_SELECTOR the impl.MRootDevice is preset and may be
// overridden (ie it may be nullptr on a sub-device) The PI of the sub-devices
// have parents, but we don't want to return them. They must pretend to be
// parentless root devices.
if (impl->isRootDevice())
throw invalid_object_error(
"No parent for device because it is not a subdevice",
PI_ERROR_INVALID_DEVICE);
else
return impl->template get_info<info::device::parent_device>();
}
#else
template <>
__SYCL_EXPORT device device::get_info<info::device::parent_device>() const {
#endif
// With ONEAPI_DEVICE_SELECTOR the impl.MRootDevice is preset and may be
// overridden (ie it may be nullptr on a sub-device) The PI of the sub-devices
// have parents, but we don't want to return them. They must pretend to be
Expand All @@ -221,15 +210,12 @@ __SYCL_EXPORT device device::get_info<info::device::parent_device>() const {
else
return impl->template get_info<info::device::parent_device>();
}
#endif

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
template <>
__SYCL_EXPORT std::vector<sycl::aspect>
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
device::get_info_internal<info::device::aspects>() const {
#else
template <>
__SYCL_EXPORT std::vector<sycl::aspect>
device::get_info<info::device::aspects>() const {
#endif
std::vector<sycl::aspect> DeviceAspects{
Expand All @@ -254,18 +240,18 @@ device::get_info<info::device::aspects>() const {
return DeviceAspects;
}

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
template <>
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
__SYCL_EXPORT bool
device::get_info_internal<info::device::image_support>() const {
#else
template <>
__SYCL_EXPORT bool device::get_info<info::device::image_support>() const {
#endif
// Explicit specialization is needed due to the class of info handle. The
// implementation is done in get_device_info_impl.
return impl->template get_info<info::device::image_support>();
}

#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
template __SYCL_EXPORT ReturnT \
Expand Down

0 comments on commit 6f36028

Please sign in to comment.