diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index c78c34d839042..c2a023a581a39 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -9,7 +9,7 @@ option(SYCL_ENABLE_WERROR "Treat all warnings as errors in SYCL project" OFF) option(SYCL_DISABLE_STL_ASSERTIONS "Disable assertions in STL containers" ON) option(SYCL_ADD_DEV_VERSION_POSTFIX "Adds -V postfix to version string" ON) option(SYCL_ENABLE_COVERAGE "Enables code coverage for runtime and unit tests" OFF) -option(SYCL_ENABLE_STACK_PRINTING "Enables stack printing on crashes of SYCL applications" OFF) +option(SYCL_ENABLE_STACK_PRINTING "Enables stack printing on crashes of SYCL applications" ON) option(SYCL_LIB_WITH_DEBUG_SYMBOLS "Builds SYCL runtime libraries with debug symbols" OFF) option(SYCL_ENABLE_IPO "Builds SYCL runtime libraries with interprocedural optimization" OFF) diff --git a/sycl/include/sycl/accessor_image.hpp b/sycl/include/sycl/accessor_image.hpp index db57a0943266b..432345477193c 100644 --- a/sycl/include/sycl/accessor_image.hpp +++ b/sycl/include/sycl/accessor_image.hpp @@ -838,9 +838,6 @@ class __SYCL_EBO unsampled_image_accessor : "Device associated with command group handler does not have " "aspect::image."); - detail::unsampledImageConstructorNotification( - detail::getSyclObjImpl(ImageRef).get(), this->impl.get(), AccessTarget, - AccessMode, (const void *)typeid(DataT).name(), sizeof(DataT), CodeLoc); detail::associateWithHandler(CommandGroupHandlerRef, this, AccessTarget); GDBMethodsAnchor(); } @@ -989,9 +986,6 @@ class __SYCL_EBO host_unsampled_image_accessor PropList) { addHostUnsampledImageAccessorAndWait(base_class::impl.get()); - detail::unsampledImageConstructorNotification( - detail::getSyclObjImpl(ImageRef).get(), this->impl.get(), std::nullopt, - AccessMode, (const void *)typeid(DataT).name(), sizeof(DataT), CodeLoc); } /* -- common interface members -- */ @@ -1149,9 +1143,6 @@ class __SYCL_EBO sampled_image_accessor : "Device associated with command group handler does not have " "aspect::image."); - detail::sampledImageConstructorNotification( - detail::getSyclObjImpl(ImageRef).get(), this->impl.get(), AccessTarget, - (const void *)typeid(DataT).name(), sizeof(DataT), CodeLoc); detail::associateWithHandler(CommandGroupHandlerRef, this, AccessTarget); GDBMethodsAnchor(); } @@ -1276,9 +1267,6 @@ class __SYCL_EBO host_sampled_image_accessor ImageRef.getSampler(), PropList) { addHostSampledImageAccessorAndWait(base_class::impl.get()); - detail::sampledImageConstructorNotification( - detail::getSyclObjImpl(ImageRef).get(), this->impl.get(), std::nullopt, - (const void *)typeid(DataT).name(), sizeof(DataT), CodeLoc); } /* -- common interface members -- */ diff --git a/sycl/include/sycl/buffer.hpp b/sycl/include/sycl/buffer.hpp index 4c0d9575c7807..51b38ca1ae36f 100644 --- a/sycl/include/sycl/buffer.hpp +++ b/sycl/include/sycl/buffer.hpp @@ -212,9 +212,6 @@ class buffer : public detail::buffer_plain, std::make_unique< detail::SYCLMemObjAllocatorHolder>()), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), nullptr, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } buffer(const range &bufferRange, AllocatorT allocator, @@ -225,9 +222,6 @@ class buffer : public detail::buffer_plain, std::make_unique>( allocator)), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), nullptr, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } buffer(T *hostData, const range &bufferRange, @@ -238,9 +232,6 @@ class buffer : public detail::buffer_plain, std::make_unique< detail::SYCLMemObjAllocatorHolder>()), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), hostData, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } buffer(T *hostData, const range &bufferRange, @@ -251,9 +242,6 @@ class buffer : public detail::buffer_plain, std::make_unique>( allocator)), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), hostData, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } template @@ -266,9 +254,6 @@ class buffer : public detail::buffer_plain, std::make_unique< detail::SYCLMemObjAllocatorHolder>()), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), hostData, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } template @@ -281,9 +266,6 @@ class buffer : public detail::buffer_plain, std::make_unique>( allocator)), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), hostData, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } buffer(const std::shared_ptr &hostData, @@ -296,10 +278,6 @@ class buffer : public detail::buffer_plain, allocator), std::is_const::value), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), (void *)hostData.get(), - (const void *)typeid(T).name(), dimensions, sizeof(T), - detail::rangeToArray(Range).data()); } buffer(const std::shared_ptr &hostData, @@ -312,10 +290,6 @@ class buffer : public detail::buffer_plain, allocator), std::is_const::value), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), (void *)hostData.get(), - (const void *)typeid(T).name(), dimensions, sizeof(T), - detail::rangeToArray(Range).data()); } buffer(const std::shared_ptr &hostData, @@ -328,10 +302,6 @@ class buffer : public detail::buffer_plain, detail::SYCLMemObjAllocatorHolder>(), std::is_const::value), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), (void *)hostData.get(), - (const void *)typeid(T).name(), dimensions, sizeof(T), - detail::rangeToArray(Range).data()); } buffer(const std::shared_ptr &hostData, @@ -344,10 +314,6 @@ class buffer : public detail::buffer_plain, detail::SYCLMemObjAllocatorHolder>(), std::is_const::value), Range(bufferRange) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), (void *)hostData.get(), - (const void *)typeid(T).name(), dimensions, sizeof(T), - detail::rangeToArray(Range).data()); } template ::value), Range(range<1>(std::distance(first, last))) { - size_t r[3] = {Range[0], 0, 0}; - buffer_plain::constructorNotification(CodeLoc, (void *)impl.get(), &first, - (const void *)typeid(T).name(), - dimensions, sizeof(T), r); } template >(), detail::iterator_to_const_type_t::value), Range(range<1>(std::distance(first, last))) { - size_t r[3] = {Range[0], 0, 0}; - buffer_plain::constructorNotification(CodeLoc, (void *)impl.get(), &first, - (const void *)typeid(T).name(), - dimensions, sizeof(T), r); } // This constructor is a prototype for a future SYCL specification @@ -427,10 +385,6 @@ class buffer : public detail::buffer_plain, std::make_unique>( allocator)), Range(range<1>(container.size())) { - size_t r[3] = {Range[0], 0, 0}; - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), container.data(), - (const void *)typeid(T).name(), dimensions, sizeof(T), r); } // This constructor is a prototype for a future SYCL specification @@ -447,9 +401,6 @@ class buffer : public detail::buffer_plain, : buffer_plain(b.impl), Range(subRange), OffsetInBytes(getOffsetInBytes(baseIndex, b.Range)), IsSubBuffer(true) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), impl.get(), (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); if (b.is_sub_buffer()) throw sycl::exception(make_error_code(errc::invalid), @@ -466,18 +417,12 @@ class buffer : public detail::buffer_plain, const detail::code_location CodeLoc = detail::code_location::current()) : buffer_plain(rhs.impl), Range(rhs.Range), OffsetInBytes(rhs.OffsetInBytes), IsSubBuffer(rhs.IsSubBuffer) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), impl.get(), (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } buffer(buffer &&rhs, const detail::code_location CodeLoc = detail::code_location::current()) : buffer_plain(std::move(rhs.impl)), Range(rhs.Range), OffsetInBytes(rhs.OffsetInBytes), IsSubBuffer(rhs.IsSubBuffer) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), impl.get(), (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } buffer &operator=(const buffer &rhs) = default; @@ -765,9 +710,6 @@ class buffer : public detail::buffer_plain, Range{0} { Range[0] = buffer_plain::getSize() / sizeof(T); - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), &MemObject, (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } void addOrReplaceAccessorProperties(const property_list &PropertyList) { @@ -785,9 +727,6 @@ class buffer : public detail::buffer_plain, const detail::code_location CodeLoc = detail::code_location::current()) : buffer_plain(Impl), Range(reinterpretRange), OffsetInBytes(reinterpretOffset), IsSubBuffer(isSubBuffer) { - buffer_plain::constructorNotification( - CodeLoc, (void *)impl.get(), Impl.get(), (const void *)typeid(T).name(), - dimensions, sizeof(T), detail::rangeToArray(Range).data()); } template diff --git a/sycl/source/CMakeLists.txt b/sycl/source/CMakeLists.txt index 47b21614f92ad..565d0c41348a0 100644 --- a/sycl/source/CMakeLists.txt +++ b/sycl/source/CMakeLists.txt @@ -85,6 +85,8 @@ function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME) OpenCL-Headers ) + target_compile_options(${LIB_OBJ_NAME} PRIVATE -fno-rtti) + # Common link step setup add_library(${LIB_NAME} SHARED diff --git a/sycl/source/detail/graph/dynamic_impl.cpp b/sycl/source/detail/graph/dynamic_impl.cpp index c8efe995aa7e5..6af9e23187927 100644 --- a/sycl/source/detail/graph/dynamic_impl.cpp +++ b/sycl/source/detail/graph/dynamic_impl.cpp @@ -361,15 +361,15 @@ void dynamic_command_group_impl::finalizeCGFList( using CGExecKernelSP = std::shared_ptr; using CGExecKernelWP = std::weak_ptr; for (std::shared_ptr CommandGroup : MCommandGroups) { - CGExecKernelSP KernelCG = - std::dynamic_pointer_cast(CommandGroup); + CGExecKernelSP KernelCG = CommandGroup->getType() == sycl::detail::CGType::Kernel ? + std::static_pointer_cast(CommandGroup) : nullptr; std::vector Alternatives; // Add all other command groups except for the current one to the list of // alternatives for (auto &OtherCG : MCommandGroups) { - CGExecKernelSP OtherKernelCG = - std::dynamic_pointer_cast(OtherCG); + CGExecKernelSP OtherKernelCG = OtherCG->getType() == sycl::detail::CGType::Kernel ? + std::static_pointer_cast(OtherCG) : nullptr; if (KernelCG != OtherKernelCG) { Alternatives.push_back(OtherKernelCG); }