SWDEV-439628 - hipGraphExecKernelNodeSetParams to update graph kernel node params with graph performance optimizations.
During hipGraphExecKernelNodeSetParams kernel function can also be updated. Hence size required for kernel parameters differs from what is allocated during graphInstantiation. So, create new 128KB kernel pool and allocate kernel args from the pool. If the pool is full create new 128KB pool. Release kernel pools when graph exec object is destroyed. Change-Id: I9567946d63400c79cbfd4c5439c654c92557ceae
This commit is contained in:
committed by
Maneesh Gupta
parent
242132caa7
commit
e9957151f3
@@ -90,7 +90,7 @@ void setCurrentDevice(unsigned int index) {
|
||||
|
||||
hip::Stream* getStream(hipStream_t stream, bool wait) {
|
||||
if (stream == nullptr) {
|
||||
return getNullStream();
|
||||
return getNullStream(wait);
|
||||
} else {
|
||||
hip::Stream* hip_stream = reinterpret_cast<hip::Stream*>(stream);
|
||||
if (wait && !(hip_stream->Flags() & hipStreamNonBlocking)) {
|
||||
@@ -128,9 +128,9 @@ int getDeviceID(amd::Context& ctx) {
|
||||
}
|
||||
|
||||
// ================================================================================================
|
||||
hip::Stream* getNullStream() {
|
||||
hip::Stream* getNullStream(bool wait ) {
|
||||
Device* device = getCurrentDevice();
|
||||
return device ? device->NullStream() : nullptr;
|
||||
return device ? device->NullStream(wait) : nullptr;
|
||||
}
|
||||
|
||||
hipError_t hipInit(unsigned int flags) {
|
||||
|
||||
Reference in New Issue
Block a user