Add support for missig hipStreamGetPriority API
Change-Id: I2be4b055e5f977eb6ecad0b1f5f9535e72345fe7
Bu işleme şunda yer alıyor:
@@ -253,3 +253,4 @@ hipTexObjectGetResourceDesc
|
||||
hipTexObjectGetResourceViewDesc
|
||||
hipTexObjectGetTextureDesc
|
||||
hipExtStreamCreateWithCUMask
|
||||
hipStreamGetPriority
|
||||
|
||||
@@ -260,6 +260,7 @@ global:
|
||||
hipEnableActivityCallback*;
|
||||
hipGetCmdName*;
|
||||
hipExtStreamCreateWithCUMask;
|
||||
hipStreamGetPriority;
|
||||
};
|
||||
local:
|
||||
*;
|
||||
|
||||
@@ -109,6 +109,8 @@ namespace hip {
|
||||
amd::Monitor& Lock() const { return lock_; }
|
||||
/// Returns the creation flags for the current stream
|
||||
unsigned int Flags() const { return flags_; }
|
||||
/// Returns the priority for the current stream
|
||||
amd::CommandQueue::Priority Priority() const { return priority_; }
|
||||
|
||||
/// Sync all non-blocking streams
|
||||
static void syncNonBlockingStreams();
|
||||
|
||||
@@ -339,3 +339,15 @@ hipError_t hipExtStreamCreateWithCUMask(hipStream_t* stream, uint32_t cuMaskSize
|
||||
HIP_RETURN(ihipStreamCreate(stream, hipStreamDefault, amd::CommandQueue::Priority::Normal, cuMaskv));
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hipError_t hipStreamGetPriority(hipStream_t stream, int* priority) {
|
||||
HIP_INIT_API(hipStreamGetPriority, stream, priority);
|
||||
if ((priority != nullptr) && (stream != nullptr)) {
|
||||
*priority = static_cast<int>(reinterpret_cast<hip::Stream*>(stream)->Priority());
|
||||
} else {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
HIP_RETURN(hipSuccess);
|
||||
|
||||
}
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle