Skip to content

Commit 8a5d80f

Browse files
authored
[SYCL][NFC] Fix ctad warnings (#16054)
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]
1 parent 20471ae commit 8a5d80f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sycl/source/detail/context_impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ std::optional<ur_program_handle_t> context_impl::getProgramForDevImgs(
493493
auto &Cache = LockedCache.get().Cache;
494494
ur_device_handle_t &DevHandle = getSyclObjImpl(Device)->getHandleRef();
495495
for (std::uintptr_t ImageIDs : ImgIdentifiers) {
496-
auto OuterKey = std::make_pair(ImageIDs, std::set{DevHandle});
496+
auto OuterKey =
497+
std::make_pair(ImageIDs, std::set<ur_device_handle_t>{DevHandle});
497498
size_t NProgs = KeyMap.count(OuterKey);
498499
if (NProgs == 0)
499500
continue;

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ ur_program_handle_t ProgramManager::getBuiltURProgram(
911911
uint32_t ImgId = Img.getImageID();
912912
const ur_device_handle_t UrDevice = Dev->getHandleRef();
913913
auto CacheKey = std::make_pair(std::make_pair(std::move(SpecConsts), ImgId),
914-
std::set{UrDevice});
914+
std::set<ur_device_handle_t>{UrDevice});
915915

916916
auto GetCachedBuildF = [&Cache, &CacheKey]() {
917917
return Cache.getOrInsertProgram(CacheKey);

sycl/unittests/helpers/MockDeviceImage.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ class MockPropertySet {
187187
/// \param Name is a property name. See ur.hpp for list of known names.
188188
/// \param Prop is a property value.
189189
void insert(const std::string &Name, MockProperty &&Props) {
190-
insert(Name, internal::LifetimeExtender{std::vector{std::move(Props)}});
190+
insert(Name, internal::LifetimeExtender{
191+
std::vector<MockProperty>{std::move(Props)}});
191192
}
192193

193194
/// Adds a new array of properties to the set.

0 commit comments

Comments
 (0)