SWDEV-301667 - Add separate field for event scope

Change-Id: I0e6b50d1a34b275ea4f1a4c659430c406d9a5a7e


[ROCm/clr commit: aace42cfab]
This commit is contained in:
Saleel Kudchadker
2022-04-16 16:18:16 -07:00
parent 3de1a9e36c
commit d4991641bd
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -209,7 +209,7 @@ hipError_t Event::streamWait(hipStream_t stream, uint flags) {
hipError_t Event::recordCommand(amd::Command*& command, amd::HostQueue* queue,
uint32_t ext_flags ) {
if (command == nullptr) {
uint32_t releaseFlags = ((ext_flags == 0) ? flags : ext_flags) &
int32_t releaseFlags = ((ext_flags == 0) ? flags : ext_flags) &
(hipEventReleaseToSystem | hipEventReleaseToDevice);
if (releaseFlags & hipEventReleaseToDevice) {
releaseFlags = amd::Device::kCacheStateAgent;
@@ -219,7 +219,7 @@ hipError_t Event::recordCommand(amd::Command*& command, amd::HostQueue* queue,
releaseFlags = amd::Device::kCacheStateIgnore;
}
// Always submit a EventMarker.
command = new hip::EventMarker(*queue, !kMarkerDisableFlush, releaseFlags);
command = new hip::EventMarker(*queue, !kMarkerDisableFlush, true, releaseFlags);
}
return hipSuccess;
}
+3 -1
View File
@@ -53,12 +53,14 @@ typedef struct ihipIpcEventShmem_s {
class EventMarker : public amd::Marker {
public:
EventMarker(amd::HostQueue& queue, bool disableFlush, uint32_t markerTs = 0)
EventMarker(amd::HostQueue& queue, bool disableFlush, bool markerTs = false,
int32_t scope = amd::Device::kCacheStateInvalid)
: amd::Marker(queue, disableFlush) {
profilingInfo_.enabled_ = true;
profilingInfo_.callback_ = nullptr;
profilingInfo_.marker_ts_ = markerTs;
profilingInfo_.clear();
setEventScope(scope);
}
};