From eb441b9946b4c5d4673ae0dcd6086a9778a31993 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Tue, 12 Nov 2024 07:40:35 -0800 Subject: [PATCH 1/3] [NFC] Fix ctad warnings llvm/sycl/source/detail/context_impl.cpp:496:48: error: 'std::set' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported] --- sycl/source/detail/context_impl.cpp | 2 +- sycl/source/detail/program_manager/program_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index d19373c7fc2a3..c60352eb10f39 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -493,7 +493,7 @@ std::optional context_impl::getProgramForDevImgs( auto &Cache = LockedCache.get().Cache; ur_device_handle_t &DevHandle = getSyclObjImpl(Device)->getHandleRef(); for (std::uintptr_t ImageIDs : ImgIdentifiers) { - auto OuterKey = std::make_pair(ImageIDs, std::set{DevHandle}); + auto OuterKey = std::make_pair(ImageIDs, std::set{DevHandle}); size_t NProgs = KeyMap.count(OuterKey); if (NProgs == 0) continue; diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index d51bdb13de37f..0c188b9fef718 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -911,7 +911,7 @@ ur_program_handle_t ProgramManager::getBuiltURProgram( uint32_t ImgId = Img.getImageID(); const ur_device_handle_t UrDevice = Dev->getHandleRef(); auto CacheKey = std::make_pair(std::make_pair(std::move(SpecConsts), ImgId), - std::set{UrDevice}); + std::set{UrDevice}); auto GetCachedBuildF = [&Cache, &CacheKey]() { return Cache.getOrInsertProgram(CacheKey); From e10e5a2b4605d77819a327707f8c7e770ea7e4e9 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Tue, 12 Nov 2024 11:17:32 -0800 Subject: [PATCH 2/3] clangformat --- sycl/source/detail/context_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index c60352eb10f39..0dcddfa24d8e2 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -493,7 +493,8 @@ std::optional context_impl::getProgramForDevImgs( auto &Cache = LockedCache.get().Cache; ur_device_handle_t &DevHandle = getSyclObjImpl(Device)->getHandleRef(); for (std::uintptr_t ImageIDs : ImgIdentifiers) { - auto OuterKey = std::make_pair(ImageIDs, std::set{DevHandle}); + auto OuterKey = + std::make_pair(ImageIDs, std::set{DevHandle}); size_t NProgs = KeyMap.count(OuterKey); if (NProgs == 0) continue; From be189be39da6236948d1f8f92afededa254233c0 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Tue, 12 Nov 2024 11:24:51 -0800 Subject: [PATCH 3/3] fix in unitests --- sycl/unittests/helpers/MockDeviceImage.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/unittests/helpers/MockDeviceImage.hpp b/sycl/unittests/helpers/MockDeviceImage.hpp index 0b6379dcd858e..fea80d6b08c3e 100644 --- a/sycl/unittests/helpers/MockDeviceImage.hpp +++ b/sycl/unittests/helpers/MockDeviceImage.hpp @@ -187,7 +187,8 @@ class MockPropertySet { /// \param Name is a property name. See ur.hpp for list of known names. /// \param Prop is a property value. void insert(const std::string &Name, MockProperty &&Props) { - insert(Name, internal::LifetimeExtender{std::vector{std::move(Props)}}); + insert(Name, internal::LifetimeExtender{ + std::vector{std::move(Props)}}); } /// Adds a new array of properties to the set.