SWDEV-314982 - hipStreamGetCaptureInfo negative cases
Change-Id: I98a65fc60610f89184b54152c8e33f59d74e3850
[ROCm/clr commit: 0e94178c03]
Tento commit je obsažen v:
@@ -1160,16 +1160,16 @@ hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec, hipGra
|
||||
hipError_t hipStreamGetCaptureInfo(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus,
|
||||
unsigned long long* pId) {
|
||||
HIP_INIT_API(hipStreamGetCaptureInfo, stream, pCaptureStatus, pId);
|
||||
if (pCaptureStatus == nullptr || pId == nullptr || !hip::isValid(stream)) {
|
||||
if (pCaptureStatus == nullptr || !hip::isValid(stream)) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
if (stream == nullptr) {
|
||||
HIP_RETURN(hipErrorStreamCaptureImplicit);
|
||||
HIP_RETURN(hipErrorUnknown);
|
||||
}
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
|
||||
*pCaptureStatus = s->GetCaptureStatus();
|
||||
if (*pCaptureStatus == hipStreamCaptureStatusActive) {
|
||||
*pId = s->GetCaptureID();
|
||||
pId = reinterpret_cast<unsigned long long*>(s->GetCaptureID());
|
||||
}
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
@@ -308,12 +308,12 @@ namespace hip {
|
||||
/// Get parent stream
|
||||
hipStream_t GetParentStream() const { return parentStream_; }
|
||||
/// Generate ID for stream capture unique over the lifetime of the process
|
||||
static int GenerateCaptureID() {
|
||||
static unsigned long long GenerateCaptureID() {
|
||||
static std::atomic<unsigned long long> uid(0);
|
||||
return ++uid;
|
||||
}
|
||||
/// Get Capture ID
|
||||
int GetCaptureID() { return captureID_; }
|
||||
unsigned long long GetCaptureID() { return captureID_; }
|
||||
void SetCaptureEvent(hipEvent_t e) { captureEvents_.push_back(e); }
|
||||
void SetParallelCaptureStream(hipStream_t s) { parallelCaptureStreams_.push_back(s); }
|
||||
};
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele