From 0c464a1039bd130f7a3faf38454f2a24ed80689c Mon Sep 17 00:00:00 2001 From: Rahul Manocha Date: Tue, 23 Jan 2024 18:18:55 +0000 Subject: [PATCH] SWDEV-421025 - hipLaunch Attr ID/Value datatypes Change-Id: If2a90c9623861a54b97354aa11dd32a155e76f9d [ROCm/hip commit: 1b632f7d8ae6bac11a8368bfd6a649883d7de107] --- projects/hip/include/hip/hip_runtime_api.h | 47 ++++++++++++++++------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/projects/hip/include/hip/hip_runtime_api.h b/projects/hip/include/hip/hip_runtime_api.h index 46b4818a26..d9dfaf92e4 100644 --- a/projects/hip/include/hip/hip_runtime_api.h +++ b/projects/hip/include/hip/hip_runtime_api.h @@ -1277,14 +1277,7 @@ typedef struct hipMemAllocNodeParams { void* dptr; ///< Returned device address of the allocation } hipMemAllocNodeParams; -/** - * Kernel node attributeID - */ -typedef enum hipKernelNodeAttrID { - hipKernelNodeAttributeAccessPolicyWindow = 1, - hipKernelNodeAttributeCooperative = 2, - hipLaunchAttributePriority = 8, -} hipKernelNodeAttrID; + typedef enum hipAccessProperty { hipAccessPropertyNormal = 0, hipAccessPropertyStreaming = 1, @@ -1297,11 +1290,39 @@ typedef struct hipAccessPolicyWindow { hipAccessProperty missProp; size_t num_bytes; } hipAccessPolicyWindow; -typedef union hipKernelNodeAttrValue { - hipAccessPolicyWindow accessPolicyWindow; - int cooperative; - int priority; -} hipKernelNodeAttrValue; + +/** + * Launch Attribute ID + */ +typedef enum hipLaunchAttributeID { + hipLaunchAttributeAccessPolicyWindow = 1, /**< Valid for Streams, graph nodes, launches*/ + hipLaunchAttributeCooperative = 2, /**< Valid for graph nodes, launches */ + hipLaunchAttributePriority = 8, /**< Valid for graph node, streams, launches */ +} hipLaunchAttributeID; + +/** + * Launch Attribute Value + */ +typedef union hipLaunchAttributeValue { + hipAccessPolicyWindow accessPolicyWindow; /**< Value of launch attribute:: + hipLaunchAttributePolicyWindow. */ + int cooperative; /**< Value of launch attribute ::hipLaunchAttributeCooperative */ + int priority; /**< Value of launch attribute :: hipLaunchAttributePriority. Execution + priority of kernel. */ +} hipLaunchAttributeValue; + +/** + * Kernel node attributeID + */ +#define hipKernelNodeAttrID hipLaunchAttributeID +#define hipKernelNodeAttributeAccessPolicyWindow hipLaunchAttributeAccessPolicyWindow +#define hipKernelNodeAttributeCooperative hipLaunchAttributeCooperative +#define hipKernelNodeAttributePriority hipLaunchAttributePriority + +/** + * Kernel node attribute value + */ +#define hipKernelNodeAttrValue hipLaunchAttributeValue /** * Memset node params