Execution Control

Execution Control#

HIP Runtime API Reference: Execution Control
Execution Control
Collaboration diagram for Execution Control:

Functions

hipError_t hipFuncSetAttribute (const void *func, hipFuncAttribute attr, int value)
 Set attribute for a specific function.
 
hipError_t hipFuncSetCacheConfig (const void *func, hipFuncCache_t config)
 Set Cache configuration for a specific function.
 
hipError_t hipFuncSetSharedMemConfig (const void *func, hipSharedMemConfig config)
 Set shared memory configuation for a specific function.
 

Detailed Description

This section describes the execution control functions of HIP runtime API.

Function Documentation

◆ hipFuncSetAttribute()

hipError_t hipFuncSetAttribute ( const void *  func,
hipFuncAttribute  attr,
int  value 
)

Set attribute for a specific function.

Parameters
[in]funcPointer of the function
[in]attrAttribute to set
[in]valueValue to set
Returns
hipSuccess, hipErrorInvalidDeviceFunction, hipErrorInvalidValue

Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.

◆ hipFuncSetCacheConfig()

hipError_t hipFuncSetCacheConfig ( const void *  func,
hipFuncCache_t  config 
)

Set Cache configuration for a specific function.

Parameters
[in]funcPointer of the function.
[in]configConfiguration to set.
Returns
hipSuccess, hipErrorNotInitialized Note: AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.

◆ hipFuncSetSharedMemConfig()

hipError_t hipFuncSetSharedMemConfig ( const void *  func,
hipSharedMemConfig  config 
)

Set shared memory configuation for a specific function.

Parameters
[in]funcPointer of the function
[in]configConfiguration
Returns
hipSuccess, hipErrorInvalidDeviceFunction, hipErrorInvalidValue

Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.