Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
1fb23cc
Merge branch 'amd-staging' into amd-master
mangupta Jul 6, 2021
80a3e9e
Merge branch 'amd-staging' into amd-master
mangupta Jul 20, 2021
9277b7b
Add dependency on rocm-core
amd-isparry Jul 8, 2021
26a09b0
Revert "Add dependency on rocm-core"
mangupta Aug 24, 2021
a6999eb
Merge branch 'amd-staging' into amd-master
mangupta Aug 24, 2021
3ed205e
Merge branch 'amd-staging' into amd-master
mangupta Sep 1, 2021
5c4458f
Merge branch 'amd-staging' into amd-master
mangupta Sep 7, 2021
f3fd593
Promote till commit 'aec056c7710cf8fbfc492020b2f8e4daa287809e'
mangupta Sep 15, 2021
982080b
Promote till commit '0b535d7d0a1ff6ed62f25717d0254aa6f4aa6479'
mangupta Nov 20, 2021
1205514
Promote till commit '36400935cfd0a03365ac8d8ce4021e6f4cbfe4c5'
mangupta Dec 8, 2021
f87d4fc
Promote till commit '92ee99cca2680e8f064f0f9614ebf7c0f8566bd1'
mangupta Dec 16, 2021
ae4f03d
Promote till commit '9cb8fd77319ac3ec4ca9d658c9ec566e14a42d6a'
mangupta Jan 27, 2022
ea92cc1
SWDEV-1 - Switch to new patch version
mangupta Jan 27, 2022
00b85dc
Promote till commit '58193bf238b290cd05980e0fffa2c56f8a3a3730'
mangupta Feb 11, 2022
1da0c24
Promote till commit '0d0ae1a459757a4effdc1f6144c58a2c0bf9330b'
mangupta Feb 22, 2022
7852f0e
Promote till commit '814b9f5db1eb50efb300442446a9c9243a065ab2'
mangupta Feb 25, 2022
0820968
Promote till commit 'fb5a64025bb0e10173a1ee4f3475db322b74b594'
mangupta Mar 14, 2022
33c50d8
Promote till commit 'bb8832f092b95951d30b26e5ab162a10e46ee14f'
mangupta Mar 25, 2022
e1efe17
Promote till commit '915beeff6c54a344fbeeebef9f96f82535cd942f'
mangupta May 19, 2022
7b358e9
Promote till commit 'bad6dd45bc0115f4d9b914088cd36fdfac25cf53'
mangupta May 26, 2022
ef347ba
Promote till commit '709d7e8753550e17b5870f77bbf160298e80cb25'
mangupta Jun 21, 2022
93d22a0
Promote till commit '3ec1ccdbbbee7090ba854eddd1dee281973a4498'
mangupta Jul 5, 2022
a497a83
Promote till commit '996ed6008141f4ef7d7017b033da0cb0d67acf0b'
mangupta Jul 15, 2022
66f2b8f
Promote till commit 'c30ba2127815cc76fe45c1886463b46f56580373'
mangupta Jul 22, 2022
8bf654d
Promote till commit '988b1cb7f012620e3640ef64c2262bda7f6cd8eb'
mangupta Jul 29, 2022
1c6d397
Promote till commit 'f9ad72b8ad3a0d8b35b05f42ff54705f8160c9ad'
mangupta Sep 8, 2022
097df62
Promote till commit '0a87e55d2e87d3551e1447e8208b33ac21b5ea7c'
mangupta Sep 20, 2022
513b54f
Promote till commit '928684dfed0fb4a8a14c6d5d79014324f3218d82'
mangupta Oct 3, 2022
448a783
Promote till commit 'f43b0efff0405c6dcd5a22e4cfae3c75fb5c96e0'
mangupta Oct 14, 2022
b98ae16
Promote till commit 'a65f7c5b1e417ef12d127b5a22ddb99f24092523'
mangupta Oct 21, 2022
6a8c41a
Promote till commit '2891862c4678460c7aa9692f812190e59d4c54e3'
mangupta Nov 9, 2022
876179c
Promote till commit 'ba2ae56522d800a803b16f3661df4d320df96078'
mangupta Nov 21, 2022
744013c
Promote till commit 'b29d165245594c7f6f95309ba2aeeb9fd18d7108'
mangupta Dec 1, 2022
4b91142
Promote till commit '9eabd8d7ede20c59cb5ba7a70c3e741c5b2eaebd'
mangupta Dec 13, 2022
6873466
Promote till commit 'bcf857c23772f810942b305721f4132cbb7de654'
mangupta Jan 27, 2023
879c4e4
SWDEV-380109, SWDEV-375004 - Fix rocprim test failure
rakesroy Jan 20, 2023
80d81cb
SWDEV-380412, SWDEV-379395 - Use getQueue as it handles null stream a…
jaydeeppatel1111 Jan 31, 2023
25a1d4e
SWDEV-381514 - adding scopelock for hipDeviceReset
pghafari Jan 23, 2023
6d2c2d4
SWDEV-380024 - Fix performance drop in TF-RCCL models
Dec 1, 2022
263b9ab
SWDEV-379941 - hipDeviceSetSharedMemConfig returns hipSuccess
mangupta Feb 13, 2023
9db82b8
SWDEV-379388 - remove check for stream capture ongoing for now
shadidashmiz Feb 17, 2023
d32bf63
SWDEV-319526 - SE ID size incresed.
jaydeeppatel1111 Feb 21, 2023
bb2b6bb
SWDEV-387810 - SWDEV-388582 - Fixes to verify if current stream match…
Mar 10, 2023
c1741e9
SWDEV-382359 - Workaround a non-uniform launch in MIOpen
gandryey Mar 27, 2023
8326bbb
SWDEV-393361 - Extern monitor to avoid copy in multithreading.
jaydeeppatel1111 Mar 29, 2023
fc3e4ce
SWDEV-392367 - Fixes hipMemGetAddressRange returning device buffer si…
Apr 13, 2023
98466aa
SWDEV-379572 - hipDeviceSetCacheConfig returns hipSuccess
mangupta Apr 24, 2023
9671ea8
SWDEV-398541/SWDEV-390170 - guard deprecated runtime apis on CUDA 12.0
agunashe Mar 22, 2023
1362d83
SWDEV-398541/SWDEV-394488 - cudaStreamGetCaptureInfo_v2 is undefined …
agunashe May 5, 2023
eaf00c0
SWDEV-398296/SWDEV-393199 - Added new include file for opengl interop…
gargrahul May 5, 2023
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#############################
option(BUILD_HIPIFY_CLANG "Enable building the CUDA->HIP converter" OFF)
option(__HIP_ENABLE_PCH "Enable/Disable pre-compiled hip headers" ON)
option(HIP_OFFICIAL_BUILD "Enable/Disable for mainline/staging builds" OFF)
option(HIP_OFFICIAL_BUILD "Enable/Disable for mainline/staging builds" ON)
option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorg with backward compatibility" ON)
set(HIPCC_BIN_DIR "" CACHE STRING "HIPCC and HIPCONFIG binary directories")

Expand Down
4 changes: 2 additions & 2 deletions include/hip/amd_detail/amd_device_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ int __syncthreads_or(int predicate)
PIPE_ID 7:6 Pipeline from which the wave was dispatched.
CU_ID 11:8 Compute Unit the wave is assigned to.
SH_ID 12 Shader Array (within an SE) the wave is assigned to.
SE_ID 14:13 Shader Engine the wave is assigned to.
SE_ID 15:13 Shader Engine the wave is assigned to.
TG_ID 19:16 Thread-group ID
VM_ID 23:20 Virtual Memory ID
QUEUE_ID 26:24 Queue from which this wave was dispatched.
Expand All @@ -935,7 +935,7 @@ int __syncthreads_or(int predicate)
#define HW_ID_CU_ID_SIZE 4
#define HW_ID_CU_ID_OFFSET 8

#define HW_ID_SE_ID_SIZE 2
#define HW_ID_SE_ID_SIZE 3
#define HW_ID_SE_ID_OFFSET 13

/*
Expand Down
8 changes: 3 additions & 5 deletions include/hip/amd_detail/amd_hip_bfloat16.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
#include "host_defines.h"
#if defined(__HIPCC_RTC__)
#define __HOST_DEVICE__ __device__
#define HIP_OSTREAM __hip_internal::ostream
#else
#define __HOST_DEVICE__ __host__ __device__
#define HIP_OSTREAM std::ostream
#endif

#if __cplusplus < 201103L || !defined(__HIPCC__)
Expand Down Expand Up @@ -181,12 +179,12 @@ static_assert(__hip_internal::is_trivial<hip_bfloat16>{},
static_assert(sizeof(hip_bfloat16) == sizeof(hip_bfloat16_public)
&& offsetof(hip_bfloat16, data) == offsetof(hip_bfloat16_public, data),
"internal hip_bfloat16 does not match public hip_bfloat16");
#endif

inline HIP_OSTREAM& operator<<(HIP_OSTREAM& os, const hip_bfloat16& bf16)
inline std::ostream& operator<<(std::ostream& os, const hip_bfloat16& bf16)
{
return os << bf16;
return os << float(bf16);
}
#endif

inline __HOST_DEVICE__ hip_bfloat16 operator+(hip_bfloat16 a)
{
Expand Down
44 changes: 44 additions & 0 deletions include/hip/nvidia_detail/nvidia_hip_gl_interop.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef HIP_INCLUDE_NVIDIA_HIP_GL_INTEROP_H
#define HIP_INCLUDE_NVIDIA_HIP_GL_INTEROP_H

#include <cuda_gl_interop.h>

typedef enum cudaGLDeviceList hipGLDeviceList;
#define hipGLDeviceListAll cudaGLDeviceListAll
#define hipGLDeviceListCurrentFrame cudaGLDeviceListCurrentFrame
#define hipGLDeviceListNextFrame cudaGLDeviceListNextFrame

inline static hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, unsigned int hipDeviceCount,
hipGLDeviceList deviceList) {
return hipCUDAErrorTohipError(cudaGLGetDevices(pHipDeviceCount, pHipDevices, hipDeviceCount, deviceList));
}

inline static hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, unsigned int flags) {
return hipCUDAErrorTohipError(cudaGraphicsGLRegisterBuffer(resource, buffer, flags));
}

inline static hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) {
return hipCUDAErrorTohipError(cudaGraphicsGLRegisterImage(resource, image, target, flags));
}
#endif
33 changes: 12 additions & 21 deletions include/hip/nvidia_detail/nvidia_hip_runtime_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ THE SOFTWARE.
#include <cuda.h>
#include <cuda_profiler_api.h>
#include <cuda_fp16.h>
#include <cuda_gl_interop.h>

#include <stdio.h>

Expand All @@ -39,6 +38,7 @@ THE SOFTWARE.
#define CUDA_11030 11030
#define CUDA_11040 11040
#define CUDA_11060 11060
#define CUDA_12000 12000

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -1302,11 +1302,6 @@ typedef cudaExternalSemaphore_t hipExternalSemaphore_t;
typedef struct cudaExternalSemaphoreSignalParams hipExternalSemaphoreSignalParams;
typedef struct cudaExternalSemaphoreWaitParams hipExternalSemaphoreWaitParams;

typedef enum cudaGLDeviceList hipGLDeviceList;
#define hipGLDeviceListAll cudaGLDeviceListAll
#define hipGLDeviceListCurrentFrame cudaGLDeviceListCurrentFrame
#define hipGLDeviceListNextFrame cudaGLDeviceListNextFrame

typedef struct cudaGraphicsResource hipGraphicsResource;
typedef cudaGraphicsResource_t hipGraphicsResource_t;

Expand Down Expand Up @@ -2773,6 +2768,7 @@ inline static hipError_t hipFuncSetCacheConfig(const void* func, hipFuncCache_t
return hipCUDAErrorTohipError(cudaFuncSetCacheConfig(func, cacheConfig));
}

#if CUDA_VERSION < CUDA_12000
__HIP_DEPRECATED inline static hipError_t hipBindTexture(size_t* offset,
struct textureReference* tex,
const void* devPtr,
Expand All @@ -2786,6 +2782,8 @@ __HIP_DEPRECATED inline static hipError_t hipBindTexture2D(
const hipChannelFormatDesc* desc, size_t width, size_t height, size_t pitch) {
return hipCUDAErrorTohipError(cudaBindTexture2D(offset, tex, devPtr, desc, width, height, pitch));
}
#endif // CUDA_VERSION < CUDA_12000


inline static hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w,
hipChannelFormatKind f) {
Expand Down Expand Up @@ -2818,10 +2816,12 @@ inline static hipError_t hipGetTextureObjectResourceDesc(hipResourceDesc* pResDe
return hipCUDAErrorTohipError(cudaGetTextureObjectResourceDesc( pResDesc, textureObject));
}

#if CUDA_VERSION < CUDA_12000
__HIP_DEPRECATED inline static hipError_t hipGetTextureAlignmentOffset(
size_t* offset, const struct textureReference* texref) {
return hipCUDAErrorTohipError(cudaGetTextureAlignmentOffset(offset,texref));
}
#endif

inline static hipError_t hipGetChannelDesc(hipChannelFormatDesc* desc, hipArray_const_t array)
{
Expand Down Expand Up @@ -2890,19 +2890,6 @@ inline static hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem) {
return hipCUDAErrorTohipError(cudaDestroyExternalMemory(extMem));
}

inline static hipError_t hipGLGetDevices(unsigned int* pHipDeviceCount, int* pHipDevices, unsigned int hipDeviceCount,
hipGLDeviceList deviceList) {
return hipCUDAErrorTohipError(cudaGLGetDevices(pHipDeviceCount, pHipDevices, hipDeviceCount, deviceList));
}

inline static hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, unsigned int flags) {
return hipCUDAErrorTohipError(cudaGraphicsGLRegisterBuffer(resource, buffer, flags));
}

inline static hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) {
return hipCUDAErrorTohipError(cudaGraphicsGLRegisterImage(resource, image, target, flags));
}

inline static hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, hipStream_t stream __dparm(0)) {
return hipCUDAErrorTohipError(cudaGraphicsMapResources(count, resources, stream));
}
Expand Down Expand Up @@ -3067,6 +3054,7 @@ inline static hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
blockSize, dynamicSMemSize, flags));
}

#if CUDA_VERSION < CUDA_12000
template <class T, int dim, enum cudaTextureReadMode readMode>
inline static hipError_t hipBindTexture(size_t* offset, const struct texture<T, dim, readMode>& tex,
const void* devPtr, size_t size = UINT_MAX) {
Expand Down Expand Up @@ -3109,6 +3097,7 @@ __HIP_DEPRECATED inline static hipError_t hipBindTextureToArray(
struct texture<T, dim, readMode>& tex, hipArray_const_t array) {
return hipCUDAErrorTohipError(cudaBindTextureToArray(tex, array));
}
#endif // CUDA_VERSION < CUDA_12000

template <class T>
inline static hipChannelFormatDesc hipCreateChannelDesc() {
Expand Down Expand Up @@ -3470,8 +3459,10 @@ inline static hipError_t hipStreamGetCaptureInfo_v2(
hipStream_t stream, hipStreamCaptureStatus* captureStatus_out,
unsigned long long* id_out __dparm(0), hipGraph_t* graph_out __dparm(0),
const hipGraphNode_t** dependencies_out __dparm(0), size_t* numDependencies_out __dparm(0)) {
return hipCUDAErrorTohipError(cudaStreamGetCaptureInfo_v2(
stream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out));
return hipCUResultTohipError(cuStreamGetCaptureInfo_v2(
stream, reinterpret_cast<CUstreamCaptureStatus *>(captureStatus_out),
reinterpret_cast<cuuint64_t *>(id_out), graph_out,
dependencies_out, numDependencies_out));
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/hip_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "utils/versions.hpp"

std::vector<hip::Device*> g_devices;

amd::Monitor g_hipInitlock{"hipInit lock"};
namespace hip {
thread_local TlsAggregator tls;
Device* host_device = nullptr;
Expand Down
15 changes: 9 additions & 6 deletions src/hip_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,16 @@ void Device::RemoveStreamFromPools(Stream* stream) {

// ================================================================================================
void Device::Reset() {
auto it = mem_pools_.begin();
while (it != mem_pools_.end()) {
auto current = it++;
(*current)->ReleaseAllMemory();
delete *current;
{
amd::ScopedLock lock(lock_);
auto it = mem_pools_.begin();
while (it != mem_pools_.end()) {
auto current = it++;
(*current)->ReleaseAllMemory();
delete *current;
}
mem_pools_.clear();
}
mem_pools_.clear();
flags_ = hipDeviceScheduleSpin;
hip::Stream::destroyAllStreams(deviceId_);
amd::MemObjMap::Purge(devices()[0]);
Expand Down
7 changes: 4 additions & 3 deletions src/hip_device_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ hipError_t hipDeviceSetCacheConfig ( hipFuncCache_t cacheConfig ) {

// No way to set cache config yet.

HIP_RETURN(hipErrorNotSupported);
HIP_RETURN(hipSuccess);
}

hipError_t hipDeviceSetLimit ( hipLimit_t limit, size_t value ) {
Expand Down Expand Up @@ -506,7 +506,7 @@ hipError_t hipDeviceSetSharedMemConfig ( hipSharedMemConfig config ) {

// No way to set cache config yet.

HIP_RETURN(hipErrorNotSupported);
HIP_RETURN(hipSuccess);
}

hipError_t hipDeviceSynchronize ( void ) {
Expand All @@ -518,7 +518,8 @@ hipError_t hipDeviceSynchronize ( void ) {
HIP_RETURN(hipErrorOutOfMemory);
}

if (hip::Stream::StreamCaptureOngoing() == true) {
if (hip::Stream::StreamCaptureOngoing(reinterpret_cast<hipStream_t>(
hip::getCurrentDevice()->GetNullStream())) == true) {
HIP_RETURN(hipErrorStreamCaptureUnsupported);
}

Expand Down
19 changes: 8 additions & 11 deletions src/hip_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ namespace hip {
static amd::Monitor eventSetLock{"Guards global event set"};
static std::unordered_set<hipEvent_t> eventSet;

bool Event::ready() {
bool Event::ready(eventType type) {
if (event_->status() != CL_COMPLETE) {
event_->notifyCmdQueue();
}
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status
bool ready = g_devices[deviceId()]->devices()[0]->IsHwEventReady(*event_);
bool ready = CheckHwEvent(type);
if (!ready) {
ready = (event_->status() == CL_COMPLETE);
}
return ready;
}

bool EventDD::ready() {
bool EventDD::ready(eventType type) {
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status
bool ready = g_devices[deviceId()]->devices()[0]->IsHwEventReady(*event_);
bool ready = CheckHwEvent(type);
// FIXME: Remove status check entirely
if (!ready) {
ready = (event_->status() == CL_COMPLETE);
Expand All @@ -60,7 +60,7 @@ hipError_t Event::query() {
return hipSuccess;
}

return ready() ? hipSuccess : hipErrorNotReady;
return ready(Query) ? hipSuccess : hipErrorNotReady;
}

hipError_t Event::synchronize() {
Expand Down Expand Up @@ -108,7 +108,7 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
return hipErrorInvalidHandle;
}

if (!ready()) {
if (!ready(ElapsedTime)) {
return hipErrorNotReady;
}

Expand All @@ -124,7 +124,7 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
return hipErrorInvalidHandle;
}

if (!ready() || !eStop.ready()) {
if (!ready(ElapsedTime) || !eStop.ready(ElapsedTime)) {
return hipErrorNotReady;
}

Expand Down Expand Up @@ -199,7 +199,7 @@ hipError_t Event::streamWait(hipStream_t stream, uint flags) {
amd::HostQueue* queue = hip::getQueue(stream);
// Access to event_ object must be lock protected
amd::ScopedLock lock(lock_);
if ((event_ == nullptr) || (event_->command().queue() == queue) || ready()) {
if ((event_ == nullptr) || (event_->command().queue() == queue) || ready(StreamWait)) {
return hipSuccess;
}
if (!event_->notifyCmdQueue()) {
Expand Down Expand Up @@ -404,9 +404,6 @@ hipError_t hipEventSynchronize(hipEvent_t event) {
HIP_RETURN(hipErrorInvalidHandle);
}

if (hip::Stream::StreamCaptureOngoing() == true) {
HIP_RETURN(hipErrorStreamCaptureUnsupported);
}
hip::Event* e = reinterpret_cast<hip::Event*>(event);
HIP_RETURN(e->synchronize());
}
Expand Down
15 changes: 13 additions & 2 deletions src/hip_event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,24 @@ class EventMarker : public amd::Marker {
}
};

enum eventType { Query, StreamWait, ElapsedTime };
class Event {
/// event recorded on stream where capture is active
bool onCapture_;
/// capture stream where event is recorded
hipStream_t captureStream_ = nullptr;
/// Previous captured nodes before event record
std::vector<hipGraphNode_t> nodesPrevToRecorded_;
protected:
bool CheckHwEvent(eventType type) {
bool ready;
if (type == Query) {
ready = g_devices[deviceId()]->devices()[0]->IsHwEventReadyForcedWait(*event_);
} else {
ready = g_devices[deviceId()]->devices()[0]->IsHwEventReady(*event_);
}
return ready;
}

public:
Event(unsigned int flags) : flags(flags), lock_("hipEvent_t", true),
Expand Down Expand Up @@ -170,7 +181,7 @@ class Event {
return hipErrorInvalidConfiguration;
}
virtual bool awaitEventCompletion();
virtual bool ready();
virtual bool ready(eventType type);
virtual int64_t time(bool getStartTs) const;

protected:
Expand All @@ -190,7 +201,7 @@ class EventDD : public Event {
virtual ~EventDD() {}

virtual bool awaitEventCompletion();
virtual bool ready();
virtual bool ready(eventType type);
virtual int64_t time(bool getStartTs) const;
};

Expand Down
2 changes: 1 addition & 1 deletion src/hip_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

std::vector<hip::Stream*> g_captureStreams;
amd::Monitor g_captureStreamsLock{"StreamCaptureGlobalList"};
static amd::Monitor g_streamSetLock{"StreamCaptureset"};
amd::Monitor g_streamSetLock{"StreamCaptureset"};
std::unordered_set<hip::Stream*> g_allCapturingStreams;

inline hipError_t ihipGraphAddNode(hipGraphNode_t graphNode, hipGraph_t graph,
Expand Down
Loading