SWDEV-480772 - Remove name variable from amd::Monitor class.

Change-Id: Ie2a4fa44f485786227230f8a892e090e718aa30e
Bu işleme şunda yer alıyor:
kjayapra-amd
2024-08-07 18:10:41 -04:00
işlemeyi yapan: Karthik Jayaprakash
ebeveyn cfdc9dfc36
işleme 12a39fbf22
27 değiştirilmiş dosya ile 76 ekleme ve 83 silme
+4 -2
Dosyayı Görüntüle
@@ -103,7 +103,8 @@ private:
//Dynamic Code Object
class DynCO : public CodeObject {
amd::Monitor dclock_{"Guards Dynamic Code object", true};
// Guards Dynamic Code object
amd::Monitor dclock_{true};
public:
DynCO() : device_id_(ihipGetDevice()), fb_info_(nullptr) {}
@@ -151,7 +152,8 @@ private:
//Static Code Object
class StatCO: public CodeObject {
amd::Monitor sclock_{"Guards Static Code object", true};
// Guards Static Code object
amd::Monitor sclock_{true};
public:
StatCO();
virtual ~StatCO();
+2 -1
Dosyayı Görüntüle
@@ -27,7 +27,8 @@
namespace hip {
static amd::Monitor eventSetLock{"Guards global event set"};
// Guards global event set
static amd::Monitor eventSetLock{};
static std::unordered_set<hipEvent_t> eventSet;
bool Event::ready(eventType type) {
+1 -1
Dosyayı Görüntüle
@@ -108,7 +108,7 @@ class Event {
}
public:
Event(uint32_t flags) : flags_(flags), lock_("hipEvent_t", true),
Event(uint32_t flags) : flags_(flags), lock_(true) /* hipEvent_t lock*/,
event_(nullptr), unrecorded_(false), stream_(nullptr) {
// No need to init event_ here as addMarker does that
device_id_ = hip::getCurrentDevice()->deviceId(); // Created in current device ctx
+4 -2
Dosyayı Görüntüle
@@ -31,8 +31,10 @@ extern std::unordered_map<GraphExec*, std::pair<hip::Stream*, bool>> GraphExecSt
extern amd::Monitor GraphExecStatusLock_;
std::vector<hip::Stream*> g_captureStreams;
amd::Monitor g_captureStreamsLock{"StreamCaptureGlobalList"};
amd::Monitor g_streamSetLock{"StreamCaptureset"};
// StreamCaptureGlobalList lock
amd::Monitor g_captureStreamsLock{};
// StreamCaptureset lock
amd::Monitor g_streamSetLock{};
std::unordered_set<hip::Stream*> g_allCapturingStreams;
hipError_t ihipGraphDebugDotPrint(hipGraph_t graph, const char* path, unsigned int flags);
hipError_t ihipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t* dependencies,
+12 -7
Dosyayı Görüntüle
@@ -53,20 +53,25 @@ const char* GetGraphNodeTypeString(uint32_t op) {
namespace hip {
std::unordered_map<GraphExec *, std::pair<hip::Stream *, bool>>
GraphExecStatus_ ROCCLR_INIT_PRIORITY(101);
amd::Monitor GraphExecStatusLock_ ROCCLR_INIT_PRIORITY(101){
"Guards graph execution state", true};
// Guards graph execution state
amd::Monitor GraphExecStatusLock_ ROCCLR_INIT_PRIORITY(101){true};
int GraphNode::nextID = 0;
int Graph::nextID = 0;
std::unordered_set<GraphNode*> GraphNode::nodeSet_;
amd::Monitor GraphNode::nodeSetLock_{"Guards global node set"};
// Guards global node set
amd::Monitor GraphNode::nodeSetLock_{};
std::unordered_set<Graph*> Graph::graphSet_;
amd::Monitor Graph::graphSetLock_{"Guards global graph set"};
// Guards global graph set
amd::Monitor Graph::graphSetLock_{};
std::unordered_set<GraphExec*> GraphExec::graphExecSet_;
amd::Monitor GraphExec::graphExecSetLock_{"Guards global exec graph set"};
// Guards global exec graph set
amd::Monitor GraphExec::graphExecSetLock_{};
std::unordered_set<UserObject*> UserObject::ObjectSet_;
amd::Monitor UserObject::UserObjectLock_{"Guards global user object"};
amd::Monitor GraphNode::WorkerThreadLock_{"Guards mem map add/remove against work thread"};
// Guards global user object
amd::Monitor UserObject::UserObjectLock_{};
// Guards mem map add/remove against work thread
amd::Monitor GraphNode::WorkerThreadLock_{};
hipError_t GraphMemcpyNode1D::ValidateParams(void* dst, const void* src, size_t count,
hipMemcpyKind kind) {
+4 -2
Dosyayı Görüntüle
@@ -453,8 +453,10 @@ public:
/// HIP Device class
class Device : public amd::ReferenceCountedObject {
amd::Monitor lock_{"Device lock", true};
amd::Monitor streamSetLock{"Guards device stream set"};
// Device lock
amd::Monitor lock_{true};
// Guards device stream set
amd::Monitor streamSetLock{};
std::unordered_set<hip::Stream*> streamSet;
/// ROCclr context
amd::Context* context_;
+2 -1
Dosyayı Görüntüle
@@ -28,7 +28,8 @@
#include "platform/external_memory.hpp"
namespace hip {
amd::Monitor hipArraySetLock{"Guards global hipArray set"};
// Guards global hipArray set
amd::Monitor hipArraySetLock{};
std::unordered_set<hipArray*> hipArraySet;
// ================================================================================================
+1 -1
Dosyayı Görüntüle
@@ -199,7 +199,7 @@ class MemoryPool : public amd::ReferenceCountedObject {
MemoryPool(hip::Device* device, const hipMemPoolProps* props = nullptr, bool phys_mem = false)
: busy_heap_(device),
free_heap_(device),
lock_pool_ops_("Pool operations", true),
lock_pool_ops_(true), /* Pool operations */
device_(device),
shared_(nullptr),
max_total_size_(0) {
+4 -2
Dosyayı Görüntüle
@@ -43,10 +43,12 @@ struct UniqueFD {
namespace hip {
class PlatformState {
amd::Monitor lock_{"Guards PlatformState globals", true};
// Guards PlatformState globals
amd::Monitor lock_{true};
// global level lock for unique file descritor map: ufd_map_
amd::Monitor ufd_lock_{"Unique FD Store Lock", true};
// Unique FD Store Lock
amd::Monitor ufd_lock_{true};
// Singleton object
static PlatformState* platform_;
+2 -1
Dosyayı Görüntüle
@@ -306,7 +306,8 @@ bool RTCCompileProgram::transformOptions(std::vector<std::string>& compile_optio
return findIsa();
}
amd::Monitor RTCProgram::lock_("HIPRTC Program", true);
// HIPRTC Program lock
amd::Monitor RTCProgram::lock_(true);
bool RTCCompileProgram::compile(const std::vector<std::string>& options, bool fgpu_rdc) {
if (!addSource_impl()) {
+2 -1
Dosyayı Görüntüle
@@ -72,7 +72,8 @@ template <typename T, typename... Args> inline std::string ToString(T first, Arg
} // namespace internal
} // namespace hiprtc
static amd::Monitor g_hiprtcInitlock{"hiprtcInit lock"};
// hiprtcInit lock
static amd::Monitor g_hiprtcInitlock{};
#define HIPRTC_INIT_API_INTERNAL(...) \
amd::Thread* thread = amd::Thread::current(); \
if (!VDI_CHECK_THREAD(thread)) { \