From 50a845c43ab8cf6397ea88e4f7e486a6ec622dd6 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Tue, 18 Oct 2022 12:09:42 -0700 Subject: [PATCH] SWDEV-322000 - Removing scoped locks in code regions with Comgr calls Comgr now internally locks to avoid multi-threading issues with LLVM Change-Id: I74b903d373af55c2efade17a9caf31fda3ca1795 [ROCm/clr commit: 2835ff1a63127afb99a6bf5d6ecc0575a6391d48] --- projects/clr/hipamd/src/hiprtc/hiprtcInternal.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/projects/clr/hipamd/src/hiprtc/hiprtcInternal.cpp b/projects/clr/hipamd/src/hiprtc/hiprtcInternal.cpp index 816a1ca24f..a92dd255c5 100644 --- a/projects/clr/hipamd/src/hiprtc/hiprtcInternal.cpp +++ b/projects/clr/hipamd/src/hiprtc/hiprtcInternal.cpp @@ -231,7 +231,6 @@ bool RTCCompileProgram::transformOptions() { amd::Monitor RTCProgram::lock_("HIPRTC Program", true); bool RTCCompileProgram::compile(const std::vector& options, bool fgpu_rdc) { - amd::ScopedLock lock(lock_); // Lock, because LLVM is not multi threaded if (!addSource_impl()) { LogError("Error in hiprtc: unable to add source code"); @@ -500,7 +499,6 @@ amd_comgr_data_kind_t RTCLinkProgram::GetCOMGRDataKind(hiprtcJITInputType input_ } bool RTCLinkProgram::AddLinkerFile(std::string file_path, hiprtcJITInputType input_type) { - amd::ScopedLock lock(lock_); std::vector llvm_bitcode; // Get the file size. @@ -555,7 +553,6 @@ bool RTCLinkProgram::AddLinkerFile(std::string file_path, hiprtcJITInputType inp bool RTCLinkProgram::AddLinkerData(void* image_ptr, size_t image_size, std::string link_file_name, hiprtcJITInputType input_type) { - amd::ScopedLock lock(lock_); char* image_char_buf = reinterpret_cast(image_ptr); std::vector llvm_bitcode; @@ -593,7 +590,6 @@ bool RTCLinkProgram::AddLinkerData(void* image_ptr, size_t image_size, std::stri } bool RTCLinkProgram::LinkComplete(void** bin_out, size_t* size_out) { - amd::ScopedLock lock(lock_); if (!findIsa()) { return false;