Go to the documentation of this file.
43 #ifndef HSA_RUNTIME_INC_HSA_H_
44 #define HSA_RUNTIME_INC_HSA_H_
58 #ifndef HSA_EXPORT_DECORATOR
60 #define HSA_EXPORT_DECORATOR __attribute__ ((visibility ("default")))
62 #define HSA_EXPORT_DECORATOR
65 #define HSA_API_EXPORT HSA_EXPORT_DECORATOR HSA_CALL
66 #define HSA_API_IMPORT HSA_CALL
68 #if !defined(HSA_API) && defined(HSA_EXPORT)
69 #define HSA_API HSA_API_EXPORT
71 #define HSA_API HSA_API_IMPORT
75 #undef HSA_LARGE_MODEL
76 #if defined(__LP64__) || defined(_M_X64)
77 #define HSA_LARGE_MODEL
81 #if !defined(LITTLEENDIAN_CPU) && !defined(BIGENDIAN_CPU)
82 #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
84 #define LITTLEENDIAN_CPU
88 #undef HSA_LITTLE_ENDIAN
89 #if defined(LITTLEENDIAN_CPU)
90 #define HSA_LITTLE_ENDIAN
91 #elif defined(BIGENDIAN_CPU)
93 #error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
96 #ifndef HSA_DEPRECATED
97 #define HSA_DEPRECATED
105 #define HSA_VERSION_1_0 1
281 const char ** status_string);
592 uint16_t version_major,
593 uint16_t version_minor,
621 uint16_t version_major,
622 uint16_t *version_minor,
661 uint16_t version_major,
662 uint16_t version_minor,
701 uint16_t version_major,
1237 uint16_t version_major,
1238 uint16_t version_minor,
1272 uint16_t version_major,
1273 uint16_t *version_minor,
1299 #ifdef HSA_LARGE_MODEL
1337 uint32_t num_consumers,
1987 uint64_t timeout_hint,
1997 uint64_t timeout_hint,
2009 uint64_t timeout_hint,
2056 uint32_t num_signals,
2058 uint32_t num_consumers,
2228 #ifdef HSA_LARGE_MODEL
2230 #elif defined HSA_LITTLE_ENDIAN
2349 uint32_t private_segment_size,
2350 uint32_t group_segment_size,
2942 #ifdef HSA_LARGE_MODEL
2944 #elif defined HSA_LITTLE_ENDIAN
2995 #ifdef HSA_LARGE_MODEL
2997 #elif defined HSA_LITTLE_ENDIAN
4030 const void *code_object,
4123 const char *options,
4159 const char *options,
4244 const char *options,
4311 const char *options,
4345 const char *options);
4433 const char *variable_name,
4481 const char *variable_name,
4533 const char *variable_name,
4591 const char *options,
4646 const char *module_name,
4647 const char *symbol_name,
4649 int32_t call_convention,
4683 const char *symbol_name,
5151 const char *options,
5152 void **serialized_code_object,
5153 size_t *serialized_code_object_size);
5186 void *serialized_code_object,
5187 size_t serialized_code_object_size,
5188 const char *options,
5350 const char *options);
5396 const char *symbol_name,
5429 const char *module_name,
5430 const char *symbol_name,
5636 #endif // header guard
uint64_t id
Queue identifier, which is unique over the lifetime of the application.
@ HSA_EXTENSION_AMD_LOADER
Loader extension.
@ HSA_STATUS_ERROR_INVALID_SIGNAL_GROUP
The signal group is invalid.
@ HSA_WAVEFRONT_INFO_SIZE
Number of work-items in the wavefront.
@ HSA_PACKET_HEADER_SCRELEASE_FENCE_SCOPE
Release fence scope, The value of this sub-field determines the scope and type of the memory fence op...
@ HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE
Size of kernarg segment memory that is required to hold the values of the kernel arguments,...
void HSA_API HSA_DEPRECATED hsa_signal_xor_acq_rel(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
uint64_t HSA_API HSA_DEPRECATED hsa_queue_cas_write_index_release(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_deserialize(void *serialized_code_object, size_t serialized_code_object_size, const char *options, hsa_code_object_t *code_object)
Deserialize a code object.
@ HSA_AGENT_INFO_EXTENSIONS
Bit-mask indicating which extensions are supported by the agent.
@ HSA_CACHE_INFO_SIZE
Cache size, in bytes.
@ HSA_STATUS_ERROR_INVALID_RUNTIME_STATE
The HSA runtime is not in the configuration state.
hsa_status_t HSA_API hsa_isa_from_name(const char *name, hsa_isa_t *isa)
Retrieve a reference to an instruction set architecture handle out of a symbolic name.
hsa_region_info_t
Attributes of a memory region.
@ HSA_STATUS_ERROR_INVALID_EXECUTABLE
The executable is invalid.
@ HSA_SIGNAL_CONDITION_NE
The two operands are not equal.
@ HSA_AMD_FIRST_EXTENSION
First AMD extension number.
hsa_signal_value_t HSA_API hsa_signal_load_relaxed(hsa_signal_t signal)
Atomically read the current value of a signal.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acq_rel(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
uint64_t handle
Opaque handle.
@ HSA_ISA_INFO_FBARRIER_MAX_SIZE
Maximum number of fbarriers per work-group.
@ HSA_STATUS_ERROR_INVALID_PACKET_FORMAT
The AQL packet is malformed.
@ HSA_STATUS_ERROR_INVALID_CODE_OBJECT_READER
The code object reader is invalid.
uint32_t grid_size_z
Z dimension of grid, in work-items.
Instruction set architecture.
hsa_status_t HSA_API hsa_agent_iterate_caches(hsa_agent_t agent, hsa_status_t(*callback)(hsa_cache_t cache, void *data), void *data)
Iterate over the memory caches of a given agent, and invoke an application-defined callback on every ...
@ HSA_AGENT_FEATURE_KERNEL_DISPATCH
The agent supports AQL packets of kernel dispatch type.
void HSA_API hsa_signal_silent_store_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal without necessarily notifying the the agents waiting on it.
uint64_t HSA_API hsa_queue_cas_write_index_scacq_screl(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
@ HSA_STATUS_ERROR
A generic error has occurred.
uint64_t reserved2
Reserved.
struct hsa_agent_dispatch_packet_s hsa_agent_dispatch_packet_t
Agent dispatch packet.
@ HSA_WAIT_STATE_ACTIVE
The application thread stays active while waiting on a signal.
@ HSA_PACKET_HEADER_WIDTH_SCACQUIRE_FENCE_SCOPE
void HSA_API HSA_DEPRECATED hsa_signal_and_acq_rel(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_load_acquire(hsa_signal_t signal)
Atomically read the current value of a signal.
@ HSA_REGION_INFO_GLOBAL_FLAGS
Flag mask.
hsa_kernel_dispatch_packet_setup_t
Sub-fields of the kernel dispatch packet setup field.
@ HSA_STATUS_ERROR_INVALID_REGION
The memory region is invalid.
void HSA_API hsa_signal_or_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
hsa_access_permission_t
Access permissions.
hsa_status_t HSA_API HSA_DEPRECATED hsa_executable_get_symbol(hsa_executable_t executable, const char *module_name, const char *symbol_name, hsa_agent_t agent, int32_t call_convention, hsa_executable_symbol_t *symbol)
Get the symbol handle for a given a symbol name.
@ HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SIZE
hsa_code_symbol_info_t
Code object symbol attributes.
@ HSA_STATUS_ERROR_INVALID_SIGNAL
The signal is invalid.
struct hsa_loaded_code_object_s hsa_loaded_code_object_t
Loaded code object handle.
@ HSA_REGION_GLOBAL_FLAG_COARSE_GRAINED
Updates to memory in this region can be performed by a single agent at a time.
AQL kernel dispatch packet.
@ HSA_SYSTEM_INFO_TIMESTAMP
Current timestamp.
A memory region represents a block of virtual memory with certain properties.
@ HSA_EXTENSION_FINALIZER
Finalizer extension.
@ HSA_ISA_INFO_NAME
Human-readable description.
hsa_extension_t
HSA extensions.
@ HSA_FENCE_SCOPE_SYSTEM
The fence is applied across both agent and system scope for the global segment.
uint16_t type
Application-defined function to be performed by the destination agent.
hsa_status_t
Status codes.
void HSA_API hsa_signal_subtract_scacquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
hsa_kernel_dispatch_packet_setup_width_t
Width (in bits) of the sub-fields in hsa_kernel_dispatch_packet_setup_t.
hsa_code_object_info_t
Code object attributes.
hsa_signal_value_t HSA_API hsa_signal_wait_scacquire(hsa_signal_t signal, hsa_signal_condition_t condition, hsa_signal_value_t compare_value, uint64_t timeout_hint, hsa_wait_state_t wait_state_hint)
Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.
uint16_t reserved0
Reserved.
void HSA_API hsa_signal_add_scacq_screl(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
hsa_signal_value_t HSA_API hsa_signal_cas_relaxed(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
@ HSA_STATUS_ERROR_VARIABLE_UNDEFINED
The variable is undefined.
@ HSA_CODE_SYMBOL_INFO_MODULE_NAME_LENGTH
The length of the module name in bytes (not including the NUL terminator) to which this symbol belong...
hsa_signal_value_t HSA_API hsa_signal_cas_scacq_screl(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
@ HSA_CODE_OBJECT_TYPE_PROGRAM
Produces code object that contains ISA for all kernels and indirect functions in HSA source.
hsa_region_segment_t
Memory segments associated with a region.
hsa_status_t HSA_API hsa_wavefront_get_info(hsa_wavefront_t wavefront, hsa_wavefront_info_t attribute, void *value)
Get the current value of a wavefront attribute.
@ HSA_KERNEL_DISPATCH_PACKET_SETUP_DIMENSIONS
Number of dimensions of the grid.
hsa_status_t HSA_API hsa_iterate_agents(hsa_status_t(*callback)(hsa_agent_t agent, void *data), void *data)
Iterate over the available agents, and invoke an application-defined callback on every iteration.
@ HSA_CODE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE
Size of static group segment memory required by the kernel (per work-group), in bytes.
@ HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION
hsa_system_info_t
System attributes.
@ HSA_SYSTEM_INFO_VERSION_MAJOR
Major version of the HSA runtime specification supported by the implementation.
@ HSA_STATUS_ERROR_INVALID_CODE_SYMBOL
The code object symbol is invalid.
@ HSA_FP_TYPE_16
16-bit floating-point type.
@ HSA_FLUSH_MODE_FTZ
Flush to zero.
int32_t hsa_signal_value_t
Signal value.
hsa_status_t HSA_API HSA_DEPRECATED hsa_agent_get_exception_policies(hsa_agent_t agent, hsa_profile_t profile, uint16_t *mask)
Retrieve the exception policy support for a given combination of agent and profile.
void HSA_API hsa_queue_store_write_index_relaxed(const hsa_queue_t *queue, uint64_t value)
Atomically set the write index of a queue.
hsa_fp_type_t
Floating-point types.
Struct containing an opaque handle to an executable, which contains ISA for finalized kernels and ind...
@ HSA_REGION_INFO_SIZE
Size of this region, in bytes.
hsa_round_method_t
Round methods.
@ HSA_REGION_SEGMENT_GROUP
Group segment.
hsa_signal_value_t HSA_API hsa_signal_cas_scacquire(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
@ HSA_REGION_GLOBAL_FLAG_KERNARG
The application can use memory in the region to store kernel arguments, and provide the values for th...
hsa_executable_symbol_info_t
Executable symbol attributes.
hsa_wait_state_t
State of the application thread during a signal wait.
uint32_t reserved1
Reserved.
hsa_code_object_type_t
Code object type.
struct hsa_executable_s hsa_executable_t
Struct containing an opaque handle to an executable, which contains ISA for finalized kernels and ind...
hsa_status_t HSA_API hsa_agent_get_info(hsa_agent_t agent, hsa_agent_info_t attribute, void *value)
Get the current value of an attribute for a given agent.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE
Size of static private, spill, and arg segment memory required by this kernel (per work-item),...
Code object reader handle.
struct hsa_dim3_s hsa_dim3_t
Three-dimensional coordinate.
hsa_status_t HSA_API hsa_isa_get_info_alt(hsa_isa_t isa, hsa_isa_info_t attribute, void *value)
Get the current value of an attribute for a given instruction set architecture (ISA).
@ HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_SEGMENT
hsa_exception_policy_t
Exception policies applied in the presence of hardware exceptions.
@ HSA_STATUS_ERROR_RESOURCE_FREE
An error has been detected while releasing a resource.
hsa_status_t HSA_API hsa_memory_register(void *ptr, size_t size)
Register a global, fine-grained buffer.
@ HSA_EXECUTABLE_SYMBOL_INFO_NAME
The name of the symbol.
hsa_status_t HSA_API HSA_DEPRECATED hsa_agent_extension_supported(uint16_t extension, hsa_agent_t agent, uint16_t version_major, uint16_t version_minor, bool *result)
Query if a given version of an extension is supported by an agent.
void HSA_API hsa_signal_subtract_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
hsa_status_t HSA_API hsa_queue_destroy(hsa_queue_t *queue)
Destroy a user mode queue.
hsa_status_t HSA_API hsa_executable_freeze(hsa_executable_t executable, const char *options)
Freeze the executable.
struct hsa_callback_data_s hsa_callback_data_t
Application data handle that is passed to the serialization and deserialization functions.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acq_rel(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
hsa_status_t HSA_API hsa_code_object_reader_create_from_memory(const void *code_object, size_t size, hsa_code_object_reader_t *code_object_reader)
Create a code object reader to operate on memory.
uint64_t reserved2
Reserved.
hsa_status_t HSA_API hsa_init()
Initialize the HSA runtime.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_symbol_get_info(hsa_code_symbol_t code_symbol, hsa_code_symbol_info_t attribute, void *value)
Get the current value of an attribute for a given code symbol.
@ HSA_VARIABLE_SEGMENT_READONLY
Readonly memory segment.
@ HSA_STATUS_ERROR_INVALID_ISA
The instruction set architecture is invalid.
uint64_t HSA_API HSA_DEPRECATED hsa_queue_load_read_index_acquire(const hsa_queue_t *queue)
Atomically load the read index of a queue.
struct hsa_code_symbol_s hsa_code_symbol_t
Code object symbol handle.
hsa_default_float_rounding_mode_t
Default floating-point rounding mode.
@ HSA_CODE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT
Alignment (in bytes) of the buffer used to pass arguments to the kernel, which is the maximum of 16 a...
@ HSA_STATUS_ERROR_VARIABLE_ALREADY_DEFINED
The variable is already defined.
@ HSA_CODE_OBJECT_INFO_ISA
Instruction set architecture this code object is produced for.
@ HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE
@ HSA_EXECUTABLE_INFO_STATE
Executable state.
@ HSA_STATUS_ERROR_OUT_OF_RESOURCES
The HSA runtime failed to allocate the necessary resources.
@ HSA_DEVICE_TYPE_DSP
DSP device.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_release(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
hsa_signal_value_t HSA_API hsa_signal_load_scacquire(hsa_signal_t signal)
Atomically read the current value of a signal.
@ HSA_AGENT_INFO_WAVEFRONT_SIZE
@ HSA_PACKET_HEADER_SCACQUIRE_FENCE_SCOPE
Acquire fence scope.
@ HSA_REGION_INFO_ALLOC_MAX_SIZE
Maximum allocation size in this region, in bytes.
@ HSA_ACCESS_PERMISSION_RO
Read-only access.
@ HSA_REGION_INFO_SEGMENT
Segment where memory in the region can be used.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_wait_acquire(hsa_signal_t signal, hsa_signal_condition_t condition, hsa_signal_value_t compare_value, uint64_t timeout_hint, hsa_wait_state_t wait_state_hint)
Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.
@ HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ADDRESS
The address of the variable.
@ HSA_ISA_INFO_FAST_F16_OPERATION
Flag indicating that the f16 HSAIL operation is at least as fast as the f32 operation in the instruct...
@ HSA_DEVICE_TYPE_CPU
CPU device.
hsa_status_t HSA_API hsa_executable_iterate_agent_symbols(hsa_executable_t executable, hsa_agent_t agent, hsa_status_t(*callback)(hsa_executable_t exec, hsa_agent_t agent, hsa_executable_symbol_t symbol, void *data), void *data)
Iterate over the kernels, indirect functions, and agent allocation variables in an executable for a g...
@ HSA_ISA_INFO_MACHINE_MODELS
Machine models supported by the instruction set architecture.
@ HSA_EXECUTABLE_SYMBOL_INFO_IS_DEFINITION
Indicates whether the symbol corresponds to a definition.
@ HSA_ACCESS_PERMISSION_WO
Write-only access.
uint32_t size
Maximum number of packets the queue can hold.
uint64_t HSA_API hsa_queue_cas_write_index_scacquire(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
uint64_t reserved2
Reserved.
@ HSA_CODE_OBJECT_INFO_DEFAULT_FLOAT_ROUNDING_MODE
Default floating-point rounding mode used when the code object is produced.
void HSA_API hsa_signal_add_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
void HSA_API HSA_DEPRECATED hsa_signal_add_acq_rel(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
struct hsa_cache_s hsa_cache_t
Cache handle.
Struct containing an opaque handle to a code object, which contains ISA for finalized kernels and ind...
@ HSA_STATUS_ERROR_INVALID_FILE
The file descriptor is invalid.
@ HSA_STATUS_ERROR_INVALID_CODE_OBJECT
The code object is invalid.
@ HSA_AGENT_INFO_NAME
Agent name.
@ HSA_SYMBOL_LINKAGE_PROGRAM
Program linkage.
@ HSA_VARIABLE_ALLOCATION_PROGRAM
Program allocation.
uint64_t HSA_API hsa_queue_add_write_index_screlease(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
struct hsa_signal_group_s hsa_signal_group_t
Group of signals.
uint64_t HSA_API HSA_DEPRECATED hsa_queue_add_write_index_acq_rel(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
@ HSA_FP_TYPE_32
32-bit floating-point type.
hsa_signal_value_t HSA_API hsa_signal_exchange_scacq_screl(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
@ HSA_FENCE_SCOPE_NONE
No scope (no fence is applied).
void HSA_API hsa_signal_xor_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
struct hsa_queue_s hsa_queue_t
User mode queue.
uint64_t handle
Opaque handle.
uint32_t reserved0
Reserved.
@ HSA_CODE_SYMBOL_INFO_MODULE_NAME
The module name to which this symbol belongs if this symbol has module linkage, otherwise an empty st...
@ HSA_CACHE_INFO_NAME
Human-readable description.
@ HSA_PACKET_HEADER_WIDTH_TYPE
hsa_status_t HSA_API HSA_DEPRECATED hsa_isa_compatible(hsa_isa_t code_object_isa, hsa_isa_t agent_isa, bool *result)
Check if the instruction set architecture of a code object can be executed on an agent associated wit...
@ HSA_ISA_INFO_DEFAULT_FLOAT_ROUNDING_MODES
Default floating-point rounding modes supported by the instruction set architecture.
@ HSA_STATUS_ERROR_INVALID_SYMBOL_NAME
There is no symbol with the given name.
uint64_t HSA_API HSA_DEPRECATED hsa_queue_add_write_index_release(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
uint64_t HSA_API hsa_queue_add_write_index_scacq_screl(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
int hsa_file_t
POSIX file descriptor.
@ HSA_PACKET_HEADER_WIDTH_ACQUIRE_FENCE_SCOPE
hsa_queue_feature_t
Queue features.
@ HSA_ENDIANNESS_BIG
The most significant byte is stored in the smallest address.
@ HSA_VARIABLE_ALLOCATION_AGENT
Agent allocation.
hsa_signal_t dep_signal[5]
Array of dependent signal objects.
uint64_t arg[4]
Function arguments.
@ HSA_ISA_INFO_NAME_LENGTH
The length of the ISA name in bytes, not including the NUL terminator.
@ HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME_LENGTH
@ HSA_FP_TYPE_64
64-bit floating-point type.
hsa_signal_t completion_signal
Signal used to indicate completion of the job.
@ HSA_STATUS_ERROR_EXCEPTION
An HSAIL operation resulted in a hardware exception.
struct hsa_executable_symbol_s hsa_executable_symbol_t
Executable symbol handle.
@ HSA_AGENT_INFO_QUEUES_MAX
uint64_t HSA_API HSA_DEPRECATED hsa_queue_load_write_index_acquire(const hsa_queue_t *queue)
Atomically load the write index of a queue.
hsa_symbol_kind_t
Symbol type.
@ HSA_ISA_INFO_WORKGROUP_MAX_DIM
Maximum number of work-items of each dimension of a work-group.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_get_symbol_from_name(hsa_code_object_t code_object, const char *module_name, const char *symbol_name, hsa_code_symbol_t *symbol)
Get the symbol handle within a code object for a given a symbol name.
hsa_queue_type32_t type
Queue type.
void HSA_API HSA_DEPRECATED hsa_signal_or_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
@ HSA_STATUS_ERROR_INVALID_QUEUE
The queue is invalid.
void HSA_API HSA_DEPRECATED hsa_signal_xor_acquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
@ HSA_CODE_SYMBOL_INFO_VARIABLE_IS_CONST
Indicates whether the variable is constant.
@ HSA_AGENT_INFO_DEVICE
Type of hardware device associated with the agent.
@ HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS
The arguments passed to a functions are not compatible.
hsa_status_t HSA_API hsa_queue_inactivate(hsa_queue_t *queue)
Inactivate a queue.
hsa_status_t HSA_API hsa_system_get_major_extension_table(uint16_t extension, uint16_t version_major, size_t table_length, void *table)
Retrieve the function pointers corresponding to a given major version of an extension.
void HSA_API HSA_DEPRECATED hsa_signal_store_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal.
struct hsa_barrier_or_packet_s hsa_barrier_or_packet_t
Barrier-OR packet.
hsa_status_t HSA_API hsa_executable_get_info(hsa_executable_t executable, hsa_executable_info_t attribute, void *value)
Get the current value of an attribute for a given executable.
@ HSA_AGENT_INFO_VERSION_MAJOR
Major version of the HSA runtime specification supported by the agent.
@ HSA_PACKET_TYPE_KERNEL_DISPATCH
Packet used by agents for dispatching jobs to kernel agents.
uint64_t kernel_object
Opaque handle to a code object that includes an implementation-defined executable code for the kernel...
@ HSA_AGENT_INFO_WORKGROUP_MAX_SIZE
uint64_t HSA_API HSA_DEPRECATED hsa_queue_add_write_index_acquire(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
@ HSA_ISA_INFO_GRID_MAX_SIZE
Maximum total number of work-items in a grid.
uint64_t HSA_API HSA_DEPRECATED hsa_queue_cas_write_index_acquire(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
@ HSA_AGENT_INFO_VERSION_MINOR
Minor version of the HSA runtime specification supported by the agent.
@ HSA_EXECUTABLE_SYMBOL_INFO_NAME_LENGTH
The length of the symbol name in bytes, not including the NUL terminator.
@ HSA_SYSTEM_INFO_MACHINE_MODEL
Machine model supported by the HSA runtime.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_get_info(hsa_code_object_t code_object, hsa_code_object_info_t attribute, void *value)
Get the current value of an attribute for a given code object.
Loaded code object handle.
@ HSA_VARIABLE_SEGMENT_GLOBAL
Global memory segment.
@ HSA_MACHINE_MODEL_SMALL
Small machine model.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_serialize(hsa_code_object_t code_object, hsa_status_t(*alloc_callback)(size_t size, hsa_callback_data_t data, void **address), hsa_callback_data_t callback_data, const char *options, void **serialized_code_object, size_t *serialized_code_object_size)
Serialize a code object.
hsa_status_t HSA_API hsa_memory_allocate(hsa_region_t region, size_t size, void **ptr)
Allocate a block of memory in a given region.
uint16_t header
Packet header.
hsa_status_t HSA_API hsa_signal_group_destroy(hsa_signal_group_t signal_group)
Destroy a signal group previous created by hsa_signal_group_create.
@ HSA_EXECUTABLE_INFO_PROFILE
Profile this executable is created for.
@ HSA_SYMBOL_KIND_VARIABLE
Variable.
@ HSA_STATUS_ERROR_INVALID_ISA_NAME
The instruction set architecture name is invalid.
@ HSA_CODE_OBJECT_INFO_PROFILE
Profile this code object is produced for.
hsa_queue_type_t
Queue type.
void HSA_API hsa_signal_and_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
@ HSA_REGION_INFO_RUNTIME_ALLOC_GRANULE
Allocation granularity of buffers allocated by hsa_memory_allocate in this region.
@ HSA_EXTENSION_AMD_PROFILER
Profiler extension.
uint64_t handle
Opaque handle.
@ HSA_CODE_SYMBOL_INFO_VARIABLE_ALLOCATION
The allocation kind of the variable.
@ HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALLOCATION
uint32_t group_segment_size
Size in bytes of group memory allocation request (per work-group).
uint16_t header
Packet header.
hsa_signal_t doorbell_signal
Signal object used by the application to indicate the ID of a packet that is ready to be processed.
@ HSA_SYSTEM_INFO_SIGNAL_MAX_WAIT
Maximum duration of a signal wait operation.
hsa_status_t HSA_API hsa_queue_create(hsa_agent_t agent, uint32_t size, hsa_queue_type32_t type, void(*callback)(hsa_status_t status, hsa_queue_t *source, void *data), void *data, uint32_t private_segment_size, uint32_t group_segment_size, hsa_queue_t **queue)
Create a user mode queue.
hsa_status_t HSA_API hsa_cache_get_info(hsa_cache_t cache, hsa_cache_info_t attribute, void *value)
Get the current value of an attribute for a given cache object.
@ HSA_PACKET_HEADER_RELEASE_FENCE_SCOPE
@ HSA_EXECUTABLE_STATE_UNFROZEN
Executable state, which allows the user to load code objects and define external variables.
struct hsa_agent_s hsa_agent_t
Struct containing an opaque handle to an agent, a device that participates in the HSA memory model.
@ HSA_AGENT_INFO_QUEUE_MAX_SIZE
Maximum number of packets that a queue created in the agent can hold.
void HSA_API hsa_signal_store_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal.
@ HSA_SYMBOL_LINKAGE_MODULE
Module linkage.
hsa_status_t HSA_API HSA_DEPRECATED hsa_executable_iterate_symbols(hsa_executable_t executable, hsa_status_t(*callback)(hsa_executable_t exec, hsa_executable_symbol_t symbol, void *data), void *data)
Iterate over the symbols in a executable, and invoke an application-defined callback on every iterati...
struct hsa_isa_s hsa_isa_t
Instruction set architecture.
@ HSA_AGENT_INFO_MACHINE_MODEL
uint32_t private_segment_size
Size in bytes of private memory allocation request (per work-item).
hsa_signal_value_t HSA_API hsa_signal_exchange_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
hsa_status_t HSA_API hsa_memory_deregister(void *ptr, size_t size)
Deregister memory previously registered using hsa_memory_register.
hsa_signal_t completion_signal
Signal used to indicate completion of the job.
@ HSA_EXECUTABLE_INFO_DEFAULT_FLOAT_ROUNDING_MODE
Default floating-point rounding mode specified when executable was created.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_GROUP_SEGMENT_SIZE
Size of static group segment memory required by the kernel (per work-group), in bytes.
@ HSA_SYSTEM_INFO_EXTENSIONS
Bit-mask indicating which extensions are supported by the implementation.
void HSA_API HSA_DEPRECATED hsa_signal_add_acquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
void HSA_API hsa_signal_store_screlease(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal.
@ HSA_KERNEL_DISPATCH_PACKET_SETUP_WIDTH_DIMENSIONS
@ HSA_STATUS_ERROR_INVALID_ALLOCATION
The requested allocation is not valid.
@ HSA_EXECUTABLE_STATE_FROZEN
Executable state, which allows the user to query variable addresses, kernel code handles,...
uint16_t workgroup_size_z
Z dimension of work-group, in work-items.
hsa_endianness_t
Endianness.
@ HSA_STATUS_ERROR_REFCOUNT_OVERFLOW
The maximum reference count for the object has been reached.
hsa_status_t HSA_API hsa_code_object_reader_create_from_file(hsa_file_t file, hsa_code_object_reader_t *code_object_reader)
Create a code object reader to operate on a file.
@ HSA_EXTENSION_STD_LAST
Extension count.
@ HSA_AGENT_INFO_QUEUE_TYPE
Type of a queue created in the agent.
@ HSA_EXECUTABLE_SYMBOL_INFO_INDIRECT_FUNCTION_OBJECT
Indirect function object handle.
hsa_status_t HSA_API hsa_executable_agent_global_variable_define(hsa_executable_t executable, hsa_agent_t agent, const char *variable_name, void *address)
Define an external global variable with agent allocation.
uint32_t grid_size_x
X dimension of grid, in work-items.
@ HSA_CODE_SYMBOL_INFO_IS_DEFINITION
Indicates whether the symbol corresponds to a definition.
hsa_signal_t completion_signal
Signal used to indicate completion of the job.
@ HSA_ISA_INFO_WORKGROUP_MAX_SIZE
Maximum total number of work-items in a work-group.
void HSA_API hsa_signal_silent_store_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal without necessarily notifying the the agents waiting on it.
Code object symbol handle.
@ HSA_EXCEPTION_POLICY_DETECT
If a hardware exception is detected, a hardware status bit is set.
@ HSA_ROUND_METHOD_DOUBLE
Double round method.
@ HSA_STATUS_ERROR_INVALID_AGENT
The agent is invalid.
struct hsa_region_s hsa_region_t
A memory region represents a block of virtual memory with certain properties.
void HSA_API hsa_queue_store_read_index_screlease(const hsa_queue_t *queue, uint64_t value)
Atomically set the read index of a queue.
@ HSA_CODE_SYMBOL_INFO_KERNEL_PRIVATE_SEGMENT_SIZE
Size of static private, spill, and arg segment memory required by this kernel (per work-item),...
@ HSA_PACKET_HEADER_TYPE
Packet type.
void HSA_API hsa_signal_and_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
uint64_t handle
Opaque handle.
hsa_signal_t completion_signal
Signal used to indicate completion of the job.
@ HSA_EXTENSION_IMAGES
Images extension.
hsa_status_t HSA_API hsa_signal_group_wait_any_relaxed(hsa_signal_group_t signal_group, const hsa_signal_condition_t *conditions, const hsa_signal_value_t *compare_values, hsa_wait_state_t wait_state_hint, hsa_signal_t *signal, hsa_signal_value_t *value)
Wait until the value of at least one of the signals in a signal group satisfies its associated condit...
@ HSA_AMD_LAST_EXTENSION
Last AMD extension.
uint64_t HSA_API hsa_queue_cas_write_index_relaxed(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
@ HSA_CODE_SYMBOL_INFO_NAME_LENGTH
The length of the symbol name in bytes, not including the NUL terminator.
@ HSA_REGION_INFO_RUNTIME_ALLOC_ALIGNMENT
Alignment of buffers allocated by hsa_memory_allocate in this region.
@ HSA_SIGNAL_CONDITION_LT
The first operand is less than the second operand.
hsa_signal_value_t HSA_API hsa_signal_cas_screlease(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
hsa_status_t HSA_API hsa_signal_group_wait_any_scacquire(hsa_signal_group_t signal_group, const hsa_signal_condition_t *conditions, const hsa_signal_value_t *compare_values, hsa_wait_state_t wait_state_hint, hsa_signal_t *signal, hsa_signal_value_t *value)
Wait until the value of at least one of the signals in a signal group satisfies its associated condit...
@ HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_ALIGNMENT
@ HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONT_SIZE
hsa_status_t HSA_API hsa_signal_create(hsa_signal_value_t initial_value, uint32_t num_consumers, const hsa_agent_t *consumers, hsa_signal_t *signal)
Create a signal.
struct hsa_wavefront_s hsa_wavefront_t
Wavefront handle.
@ HSA_CODE_SYMBOL_INFO_VARIABLE_ALIGNMENT
Alignment of the symbol in memory.
Struct containing an opaque handle to an agent, a device that participates in the HSA memory model.
uint64_t HSA_API hsa_queue_load_read_index_scacquire(const hsa_queue_t *queue)
Atomically load the read index of a queue.
uint32_t grid_size_y
Y dimension of grid, in work-items.
void HSA_API hsa_signal_or_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
void HSA_API hsa_queue_store_write_index_screlease(const hsa_queue_t *queue, uint64_t value)
Atomically set the write index of a queue.
hsa_agent_info_t
Agent attributes.
uint64_t handle
Opaque handle.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_acquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
@ HSA_PACKET_TYPE_BARRIER_OR
Packet used by agents to delay processing of subsequent packets, and to express complex dependencies ...
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_cas_acquire(hsa_signal_t signal, hsa_signal_value_t expected, hsa_signal_value_t value)
Atomically set the value of a signal if the observed value is equal to the expected value.
uint64_t reserved2
Reserved.
hsa_region_global_flag_t
Global region flags.
uint64_t handle
Opaque handle.
hsa_status_t HSA_API hsa_executable_global_variable_define(hsa_executable_t executable, const char *variable_name, void *address)
Define an external global variable with program allocation.
uint64_t handle
Opaque handle.
@ HSA_PACKET_TYPE_VENDOR_SPECIFIC
Vendor-specific packet.
uint16_t header
Packet header.
@ HSA_AGENT_INFO_CACHE_SIZE
hsa_status_t HSA_API hsa_executable_readonly_variable_define(hsa_executable_t executable, hsa_agent_t agent, const char *variable_name, void *address)
Define an external readonly variable.
@ HSA_CODE_SYMBOL_INFO_INDIRECT_FUNCTION_CALL_CONVENTION
Call convention of the indirect function.
void HSA_API hsa_signal_subtract_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
hsa_status_t HSA_API hsa_executable_load_program_code_object(hsa_executable_t executable, hsa_code_object_reader_t code_object_reader, const char *options, hsa_loaded_code_object_t *loaded_code_object)
Load a program code object into an executable.
uint16_t workgroup_size_x
X dimension of work-group, in work-items.
hsa_status_t HSA_API hsa_executable_load_agent_code_object(hsa_executable_t executable, hsa_agent_t agent, hsa_code_object_reader_t code_object_reader, const char *options, hsa_loaded_code_object_t *loaded_code_object)
Load an agent code object into an executable.
void HSA_API HSA_DEPRECATED hsa_queue_store_read_index_release(const hsa_queue_t *queue, uint64_t value)
Atomically set the read index of a queue.
hsa_symbol_linkage_t
Linkage type of a symbol.
hsa_packet_header_t
Sub-fields of the header field that is present in any AQL packet.
@ HSA_PACKET_HEADER_BARRIER
Barrier bit.
hsa_status_t HSA_API hsa_executable_validate_alt(hsa_executable_t executable, const char *options, uint32_t *result)
Validate an executable.
hsa_wavefront_info_t
Wavefront attributes.
@ HSA_STATUS_ERROR_INVALID_ARGUMENT
One of the actual arguments does not meet a precondition stated in the documentation of the correspon...
@ HSA_AGENT_INFO_QUEUE_MIN_SIZE
Minimum number of packets that a queue created in the agent can hold.
void HSA_API HSA_DEPRECATED hsa_signal_or_acquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
hsa_status_t HSA_API hsa_extension_get_name(uint16_t extension, const char **name)
Query the name of a given extension.
hsa_executable_state_t
Executable state.
uint64_t handle
Opaque handle.
@ HSA_CODE_OBJECT_INFO_MACHINE_MODEL
Machine model this code object is produced for.
@ HSA_CODE_SYMBOL_INFO_VARIABLE_SEGMENT
The segment kind of the variable.
hsa_status_t HSA_API hsa_executable_validate(hsa_executable_t executable, uint32_t *result)
Validate an executable.
void HSA_API hsa_signal_and_scacq_screl(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
hsa_status_t HSA_API hsa_agent_iterate_regions(hsa_agent_t agent, hsa_status_t(*callback)(hsa_region_t region, void *data), void *data)
Iterate over the memory regions associated with a given agent, and invoke an application-defined call...
const std::string & name()
hsa_signal_value_t HSA_API hsa_signal_exchange_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
Three-dimensional coordinate.
@ HSA_QUEUE_FEATURE_AGENT_DISPATCH
Queue supports agent dispatch packets.
@ HSA_CODE_SYMBOL_INFO_TYPE
The type of the symbol.
@ HSA_REGION_SEGMENT_READONLY
Read-only segment.
@ HSA_STATUS_ERROR_INVALID_CACHE
The cache is invalid.
uint64_t handle
Opaque handle.
uint64_t HSA_API HSA_DEPRECATED hsa_queue_cas_write_index_acq_rel(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
hsa_status_t HSA_API hsa_code_object_reader_destroy(hsa_code_object_reader_t code_object_reader)
Destroy a code object reader.
hsa_status_t HSA_API hsa_executable_destroy(hsa_executable_t executable)
Destroy an executable.
@ HSA_EXECUTABLE_SYMBOL_INFO_TYPE
The kind of the symbol.
hsa_flush_mode_t
Flush to zero modes.
@ HSA_AGENT_INFO_FAST_F16_OPERATION
uint64_t HSA_API hsa_queue_add_write_index_relaxed(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
@ HSA_EXCEPTION_POLICY_BREAK
If a hardware exception is detected, a work-item signals an exception.
@ HSA_STATUS_ERROR_FROZEN_EXECUTABLE
The executable is frozen.
@ HSA_PACKET_TYPE_INVALID
The packet has been processed in the past, but has not been reassigned to the packet processor.
hsa_packet_type_t
Packet type.
uint32_t reserved1
Reserved.
@ HSA_ISA_INFO_GRID_MAX_DIM
Maximum number of work-items of each dimension of a grid.
hsa_status_t HSA_API hsa_system_major_extension_supported(uint16_t extension, uint16_t version_major, uint16_t *version_minor, bool *result)
Query if a given version of an extension is supported by the HSA implementation.
hsa_status_t HSA_API hsa_memory_assign_agent(void *ptr, hsa_agent_t agent, hsa_access_permission_t access)
Change the ownership of a global, coarse-grained buffer.
@ HSA_CODE_SYMBOL_INFO_NAME
The name of the symbol.
hsa_signal_value_t HSA_API hsa_signal_wait_relaxed(hsa_signal_t signal, hsa_signal_condition_t condition, hsa_signal_value_t compare_value, uint64_t timeout_hint, hsa_wait_state_t wait_state_hint)
Wait until a signal value satisfies a specified condition, or a certain amount of time has elapsed.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT
Kernel object handle, used in the kernel dispatch packet.
uint32_t reserved1
Reserved.
@ HSA_PACKET_TYPE_AGENT_DISPATCH
Packet used by agents for dispatching jobs to agents.
uint32_t hsa_queue_type32_t
A fixed-size type used to represent hsa_queue_type_t constants.
hsa_isa_info_t
Instruction set architecture attributes.
uint64_t handle
Opaque handle.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_get_symbol(hsa_code_object_t code_object, const char *symbol_name, hsa_code_symbol_t *symbol)
Get the symbol handle within a code object for a given a symbol name.
@ HSA_SYMBOL_KIND_KERNEL
Kernel.
hsa_status_t HSA_API hsa_executable_symbol_get_info(hsa_executable_symbol_t executable_symbol, hsa_executable_symbol_info_t attribute, void *value)
Get the current value of an attribute for a given executable symbol.
void HSA_API HSA_DEPRECATED hsa_signal_add_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
@ HSA_AGENT_INFO_WORKGROUP_MAX_DIM
hsa_status_t HSA_API hsa_executable_get_symbol_by_name(hsa_executable_t executable, const char *symbol_name, const hsa_agent_t *agent, hsa_executable_symbol_t *symbol)
Retrieve the symbol handle corresponding to a given a symbol name.
void HSA_API HSA_DEPRECATED hsa_queue_store_write_index_release(const hsa_queue_t *queue, uint64_t value)
Atomically set the write index of a queue.
@ HSA_CACHE_INFO_LEVEL
Cache level.
struct hsa_barrier_and_packet_s hsa_barrier_and_packet_t
Barrier-AND packet.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_SIZE
Size of kernarg segment memory that is required to hold the values of the kernel arguments,...
@ HSA_REGION_INFO_ALLOC_MAX_PRIVATE_WORKGROUP_SIZE
Maximum size (per work-group) of private memory that can be requested for a specific kernel dispatch.
void HSA_API HSA_DEPRECATED hsa_signal_subtract_acq_rel(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
hsa_status_t HSA_API hsa_memory_copy(void *dst, const void *src, size_t size)
Copy a block of memory from the location pointed to by src to the memory block pointed to by dst.
@ HSA_DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT
Use a default floating-point rounding mode specified elsewhere.
uint64_t handle
Opaque handle.
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_iterate_symbols(hsa_code_object_t code_object, hsa_status_t(*callback)(hsa_code_object_t code_object, hsa_code_symbol_t symbol, void *data), void *data)
Iterate over the symbols in a code object, and invoke an application-defined callback on every iterat...
@ HSA_PACKET_HEADER_WIDTH_BARRIER
@ HSA_FLUSH_MODE_NON_FTZ
Do not flush to zero.
void HSA_API HSA_DEPRECATED hsa_signal_subtract_acquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
hsa_status_t HSA_API HSA_DEPRECATED hsa_executable_create(hsa_profile_t profile, hsa_executable_state_t executable_state, const char *options, hsa_executable_t *executable)
Create an empty executable.
@ HSA_EXECUTABLE_SYMBOL_INFO_AGENT
uint64_t HSA_API hsa_queue_load_write_index_scacquire(const hsa_queue_t *queue)
Atomically load the write index of a queue.
@ HSA_ROUND_METHOD_SINGLE
Single round method.
void HSA_API hsa_signal_subtract_scacq_screl(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
@ HSA_CACHE_INFO_NAME_LENGTH
The length of the cache name in bytes, not including the NUL terminator.
hsa_status_t HSA_API HSA_DEPRECATED hsa_executable_load_code_object(hsa_executable_t executable, hsa_agent_t agent, hsa_code_object_t code_object, const char *options)
Load code object into the executable.
@ HSA_PROFILE_BASE
Base profile.
@ HSA_ISA_INFO_CALL_CONVENTION_COUNT
@ HSA_CODE_SYMBOL_INFO_LINKAGE
The linkage kind of the symbol.
@ HSA_STATUS_ERROR_INVALID_WAVEFRONT
The wavefront is invalid.
@ HSA_FENCE_SCOPE_AGENT
The fence is applied with agent scope for the global segment.
uint16_t setup
Dispatch setup parameters.
uint64_t handle
Opaque handle.
@ HSA_CODE_OBJECT_INFO_TYPE
Type of code object.
struct hsa_kernel_dispatch_packet_s hsa_kernel_dispatch_packet_t
AQL kernel dispatch packet.
void HSA_API HSA_DEPRECATED hsa_signal_and_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
@ HSA_EXECUTABLE_SYMBOL_INFO_LINKAGE
The linkage kind of the symbol.
@ HSA_PACKET_HEADER_WIDTH_RELEASE_FENCE_SCOPE
hsa_status_t HSA_API hsa_signal_destroy(hsa_signal_t signal)
Destroy a signal previous created by hsa_signal_create.
uint16_t header
Packet header.
hsa_variable_segment_t
Memory segment associated with a variable.
hsa_device_type_t
Hardware device type.
uint16_t workgroup_size_y
Y dimension of work-group, in work-items.
@ HSA_AGENT_FEATURE_AGENT_DISPATCH
The agent supports AQL packets of agent dispatch type.
@ HSA_REGION_SEGMENT_KERNARG
Kernarg segment.
@ HSA_CODE_SYMBOL_INFO_KERNEL_CALL_CONVENTION
Call convention of the kernel.
@ HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY
Timestamp value increase rate, in Hz.
@ HSA_STATUS_INFO_BREAK
A traversal over a list of elements has been interrupted by the application before completing.
@ HSA_AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES
struct hsa_code_object_s hsa_code_object_t
Struct containing an opaque handle to a code object, which contains ISA for finalized kernels and ind...
@ HSA_SYSTEM_INFO_ENDIANNESS
Endianness of the system.
void HSA_API HSA_DEPRECATED hsa_signal_subtract_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically decrement the value of a signal by a given amount.
struct hsa_code_object_reader_s hsa_code_object_reader_t
Code object reader handle.
@ HSA_ISA_INFO_PROFILES
Profiles supported by the instruction set architecture.
@ HSA_DEVICE_TYPE_GPU
GPU device.
@ HSA_AGENT_INFO_GRID_MAX_SIZE
@ HSA_ISA_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES
Default floating-point rounding modes supported by the instruction set architecture in the Base profi...
hsa_signal_value_t HSA_API hsa_signal_exchange_scacquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
hsa_status_t HSA_API hsa_executable_create_alt(hsa_profile_t profile, hsa_default_float_rounding_mode_t default_float_rounding_mode, const char *options, hsa_executable_t *executable)
Create an empty executable.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_CALL_CONVENTION
hsa_status_t HSA_API hsa_isa_iterate_wavefronts(hsa_isa_t isa, hsa_status_t(*callback)(hsa_wavefront_t wavefront, void *data), void *data)
Iterate over the different wavefronts supported by an instruction set architecture,...
uint32_t features
Queue features mask.
hsa_executable_info_t
Executable attributes.
void HSA_API hsa_signal_or_scacquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
@ HSA_ACCESS_PERMISSION_RW
Read and write access.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK
Dynamic callstack flag.
hsa_status_t HSA_API HSA_DEPRECATED hsa_system_get_extension_table(uint16_t extension, uint16_t version_major, uint16_t version_minor, void *table)
Retrieve the function pointers corresponding to a given version of an extension.
@ HSA_STATUS_ERROR_INVALID_QUEUE_CREATION
The requested queue creation is not valid.
void HSA_API hsa_signal_add_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
void HSA_API hsa_signal_and_scacquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
struct hsa_signal_s hsa_signal_t
Signal handle.
@ HSA_REGION_GLOBAL_FLAG_FINE_GRAINED
Updates to memory in this region are immediately visible to all the agents under the terms of the HSA...
@ HSA_STATUS_SUCCESS
The function has been executed successfully.
@ HSA_EXTENSION_PROFILING_EVENTS
Profiling events extension.
@ HSA_PACKET_TYPE_BARRIER_AND
Packet used by agents to delay processing of subsequent packets, and to express complex dependencies ...
hsa_status_t HSA_API hsa_executable_iterate_program_symbols(hsa_executable_t executable, hsa_status_t(*callback)(hsa_executable_t exec, hsa_executable_symbol_t symbol, void *data), void *data)
Iterate over the program allocation variables in an executable, and invoke an application-defined cal...
@ HSA_PACKET_HEADER_WIDTH_SCRELEASE_FENCE_SCOPE
hsa_status_t HSA_API hsa_status_string(hsa_status_t status, const char **status_string)
Query additional information about a status code.
uint16_t reserved0
Reserved.
uint64_t handle
Opaque handle.
@ HSA_AGENT_INFO_VENDOR_NAME
Name of vendor.
hsa_status_t HSA_API hsa_memory_free(void *ptr)
Deallocate a block of memory previously allocated using hsa_memory_allocate.
hsa_status_t HSA_API HSA_DEPRECATED hsa_isa_get_info(hsa_isa_t isa, hsa_isa_info_t attribute, uint32_t index, void *value)
Get the current value of an attribute for a given instruction set architecture (ISA).
hsa_status_t HSA_API hsa_soft_queue_create(hsa_region_t region, uint32_t size, hsa_queue_type32_t type, uint32_t features, hsa_signal_t doorbell_signal, hsa_queue_t **queue)
Create a queue for which the application or a kernel is responsible for processing the AQL packets.
hsa_status_t HSA_API hsa_isa_get_round_method(hsa_isa_t isa, hsa_fp_type_t fp_type, hsa_flush_mode_t flush_mode, hsa_round_method_t *round_method)
Retrieve the round method (single or double) used to implement the floating-point multiply add instru...
void HSA_API hsa_signal_xor_scacq_screl(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
uint64_t HSA_API hsa_queue_add_write_index_scacquire(const hsa_queue_t *queue, uint64_t value)
Atomically increment the write index of a queue by an offset.
@ HSA_STATUS_ERROR_NOT_INITIALIZED
An API other than hsa_init has been invoked while the reference count of the HSA runtime is 0.
hsa_cache_info_t
Cache attributes.
uint64_t HSA_API hsa_queue_cas_write_index_screlease(const hsa_queue_t *queue, uint64_t expected, uint64_t value)
Atomically set the write index of a queue if the observed value is equal to the expected value.
@ HSA_EXECUTABLE_SYMBOL_INFO_KERNEL_KERNARG_SEGMENT_ALIGNMENT
Alignment (in bytes) of the buffer used to pass arguments to the kernel, which is the maximum of 16 a...
hsa_status_t HSA_API HSA_DEPRECATED hsa_code_object_destroy(hsa_code_object_t code_object)
Destroy a code object.
hsa_status_t HSA_API hsa_agent_major_extension_supported(uint16_t extension, hsa_agent_t agent, uint16_t version_major, uint16_t *version_minor, bool *result)
Query if a given version of an extension is supported by an agent.
void HSA_API HSA_DEPRECATED hsa_signal_or_acq_rel(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
hsa_status_t HSA_API hsa_signal_group_create(uint32_t num_signals, const hsa_signal_t *signals, uint32_t num_consumers, const hsa_agent_t *consumers, hsa_signal_group_t *signal_group)
Create a signal group.
@ HSA_AGENT_INFO_FBARRIER_MAX_SIZE
hsa_fence_scope_t
Scope of the memory fence operation associated with a packet.
void HSA_API hsa_signal_xor_relaxed(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
@ HSA_DEFAULT_FLOAT_ROUNDING_MODE_ZERO
Operations that specify the default floating-point mode are rounded to zero by default.
hsa_status_t HSA_API hsa_system_get_info(hsa_system_info_t attribute, void *value)
Get the current value of a system attribute.
@ HSA_CODE_SYMBOL_INFO_KERNEL_DYNAMIC_CALLSTACK
Dynamic callstack flag.
uint64_t HSA_API hsa_queue_load_write_index_relaxed(const hsa_queue_t *queue)
Atomically load the write index of a queue.
void HSA_API HSA_DEPRECATED hsa_signal_and_acquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise AND operation between the value of a signal and a given value.
@ HSA_MACHINE_MODEL_LARGE
Large machine model.
uint64_t handle
Opaque handle.
void HSA_API hsa_signal_add_scacquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically increment the value of a signal by a given amount.
@ HSA_PACKET_HEADER_ACQUIRE_FENCE_SCOPE
@ HSA_REGION_SEGMENT_GLOBAL
Global segment.
hsa_signal_t dep_signal[5]
Array of dependent signal objects.
@ HSA_SIGNAL_CONDITION_GTE
The first operand is greater than or equal to the second operand.
hsa_variable_allocation_t
Allocation type of a variable.
@ HSA_CODE_OBJECT_INFO_VERSION
The version of the code object.
@ HSA_SIGNAL_CONDITION_EQ
The two operands are equal.
@ HSA_QUEUE_TYPE_SINGLE
Queue only supports a single producer.
hsa_status_t HSA_API hsa_isa_get_exception_policies(hsa_isa_t isa, hsa_profile_t profile, uint16_t *mask)
Retrieve the exception policy support for a given combination of instruction set architecture and pro...
uint64_t HSA_API hsa_queue_load_read_index_relaxed(const hsa_queue_t *queue)
Atomically load the read index of a queue.
hsa_status_t HSA_API hsa_region_get_info(hsa_region_t region, hsa_region_info_t attribute, void *value)
Get the current value of an attribute of a region.
void HSA_API HSA_DEPRECATED hsa_signal_xor_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
@ HSA_EXECUTABLE_SYMBOL_INFO_VARIABLE_IS_CONST
@ HSA_CODE_SYMBOL_INFO_VARIABLE_SIZE
Size of the variable.
hsa_packet_header_width_t
Width (in bits) of the sub-fields in hsa_packet_header_t.
@ HSA_STATUS_ERROR_INVALID_EXECUTABLE_SYMBOL
The executable symbol is invalid.
hsa_signal_condition_t
Wait condition operator.
@ HSA_REGION_SEGMENT_PRIVATE
Private segment.
@ HSA_ENDIANNESS_LITTLE
The least significant byte is stored in the smallest address.
hsa_machine_model_t
Machine model.
void HSA_API hsa_signal_xor_scacquire(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise XOR operation between the value of a signal and a given value.
@ HSA_SYSTEM_INFO_VERSION_MINOR
Minor version of the HSA runtime specification supported by the implementation.
@ HSA_ISA_INFO_CALL_CONVENTION_INFO_WAVEFRONTS_PER_COMPUTE_UNIT
hsa_status_t HSA_API HSA_DEPRECATED hsa_system_extension_supported(uint16_t extension, uint16_t version_major, uint16_t version_minor, bool *result)
Query if a given version of an extension is supported by the HSA implementation.
hsa_signal_value_t HSA_API HSA_DEPRECATED hsa_signal_exchange_release(hsa_signal_t signal, hsa_signal_value_t value)
Atomically set the value of a signal and return its previous value.
@ HSA_QUEUE_FEATURE_KERNEL_DISPATCH
Queue supports kernel dispatch packets.
@ HSA_WAIT_STATE_BLOCKED
The application thread may be rescheduled while waiting on the signal.
hsa_agent_feature_t
Agent features.
std::vector< SwitchingFiber * > expected({ &a, &b, &a, &a, &a, &b, &c, &a, &c, &c, &c })
@ HSA_EXTENSION_PERFORMANCE_COUNTERS
Performance counter extension.
void HSA_API hsa_queue_store_read_index_relaxed(const hsa_queue_t *queue, uint64_t value)
Atomically set the read index of a queue.
hsa_status_t HSA_API hsa_shut_down()
Shut down the HSA runtime.
@ HSA_AGENT_INFO_FEATURE
Agent capability.
void HSA_API hsa_signal_or_scacq_screl(hsa_signal_t signal, hsa_signal_value_t value)
Atomically perform a bitwise OR operation between the value of a signal and a given value.
@ HSA_STATUS_ERROR_INVALID_INDEX
The index is invalid.
@ HSA_DEFAULT_FLOAT_ROUNDING_MODE_NEAR
Operations that specify the default floating-point mode are rounded to the nearest representable numb...
@ HSA_AGENT_INFO_GRID_MAX_DIM
Executable symbol handle.
hsa_status_t HSA_API hsa_agent_iterate_isas(hsa_agent_t agent, hsa_status_t(*callback)(hsa_isa_t isa, void *data), void *data)
Iterate over the instruction sets supported by the given agent, and invoke an application-defined cal...
@ HSA_QUEUE_TYPE_MULTI
Queue supports multiple producers.
@ HSA_REGION_INFO_RUNTIME_ALLOC_ALLOWED
Indicates whether memory in this region can be allocated using hsa_memory_allocate.
@ HSA_SYMBOL_KIND_INDIRECT_FUNCTION
Indirect function.
uint16_t reserved0
Reserved.
Application data handle that is passed to the serialization and deserialization functions.
@ HSA_EXECUTABLE_SYMBOL_INFO_MODULE_NAME
@ HSA_PROFILE_FULL
Full profile.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17