SWDEV-325711 - Added implementation for graph APIs GetEnabled & SetEnabled
Change-Id: I15a165b3dc548d00b7f5458e1b322b192b8c0d76
[ROCm/clr commit: 1ab46fe7ae]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Anusha Godavarthy Surya
ebeveyn
15e4fa1264
işleme
58201c1b92
@@ -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) {
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle