SWDEV-325711 - Added implementation for graph APIs GetEnabled & SetEnabled

Change-Id: I15a165b3dc548d00b7f5458e1b322b192b8c0d76


[ROCm/clr commit: 1ab46fe7ae]
Bu işleme şunda yer alıyor:
Anusha GodavarthySurya
2022-11-25 03:32:18 +00:00
işlemeyi yapan: Anusha Godavarthy Surya
ebeveyn 15e4fa1264
işleme 58201c1b92
2 değiştirilmiş dosya ile 76 ekleme ve 35 silme
+18 -2
Dosyayı Görüntüle
@@ -2169,13 +2169,29 @@ hipError_t hipGraphDebugDotPrint(hipGraph_t graph, const char* path, unsigned in
hipError_t hipGraphNodeSetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
unsigned int isEnabled) {
HIP_INIT_API(hipGraphNodeSetEnabled, hGraphExec, hNode, isEnabled);
HIP_RETURN(hipErrorNotSupported);
if (hGraphExec == nullptr || hNode == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(hNode);
if (clonedNode == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
clonedNode->SetEnabled(isEnabled);
HIP_RETURN(hipSuccess);
}
hipError_t hipGraphNodeGetEnabled(hipGraphExec_t hGraphExec, hipGraphNode_t hNode,
unsigned int* isEnabled) {
HIP_INIT_API(hipGraphNodeGetEnabled, hGraphExec, hNode, isEnabled);
HIP_RETURN(hipErrorNotSupported);
if (hGraphExec == nullptr || hNode == nullptr || isEnabled == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(hNode);
if (clonedNode == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
*isEnabled = clonedNode->GetEnabled();
HIP_RETURN(hipSuccess);
}
hipError_t hipGraphUpload(hipGraphExec_t graphExec, hipStream_t stream) {