Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sycl/source/detail/kernel_global_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ namespace detail::free_function_info_map {

__SYCL_EXPORT void add(const char *const *FreeFunctionNames,
const unsigned *FreeFunctionNumArgs, unsigned Size) {
std::unordered_map<std::string_view, unsigned> GlobalInfoToCopy;
std::unordered_map<std::string, unsigned> GlobalInfoToCopy;
for (size_t i = 0; i < Size; ++i) {
GlobalInfoToCopy[std::string_view{FreeFunctionNames[i]}] =
GlobalInfoToCopy[std::string{FreeFunctionNames[i]}] =
FreeFunctionNumArgs[i];
}
detail::ProgramManager::getInstance().registerKernelGlobalInfo(
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2412,7 +2412,7 @@ void ProgramManager::addOrInitDeviceGlobalEntry(const void *DeviceGlobalPtr,
}

void ProgramManager::registerKernelGlobalInfo(
std::unordered_map<std::string_view, unsigned> &&GlobalInfoToCopy) {
std::unordered_map<std::string, unsigned> &&GlobalInfoToCopy) {
std::lock_guard<std::mutex> Guard(MNativeProgramsMutex);
if (m_FreeFunctionKernelGlobalInfo.empty())
m_FreeFunctionKernelGlobalInfo = std::move(GlobalInfoToCopy);
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/program_manager/program_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class ProgramManager {
// The function inserts or initializes a kernel global desc into the
// kernel global map.
void registerKernelGlobalInfo(
std::unordered_map<std::string_view, unsigned> &&GlobalInfoToCopy);
std::unordered_map<std::string, unsigned> &&GlobalInfoToCopy);

// The function returns a pointer to the kernel global desc identified by
// the unique ID from the kernel global map.
Expand Down Expand Up @@ -543,7 +543,7 @@ class ProgramManager {

// Maps between free function kernel name and associated kernel global
// information.
std::unordered_map<std::string_view, unsigned> m_FreeFunctionKernelGlobalInfo;
std::unordered_map<std::string, unsigned> m_FreeFunctionKernelGlobalInfo;

// Maps between host_pipe identifiers and associated information.
std::unordered_map<std::string, std::unique_ptr<HostPipeMapEntry>>
Expand Down
Loading