gem5  v20.1.0.0
Classes | Typedefs | Enumerations | Functions
System and Agent Information

Classes

struct  hsa_agent_s
 Struct containing an opaque handle to an agent, a device that participates in the HSA memory model. More...
 
struct  hsa_cache_s
 Cache handle. More...
 

Typedefs

typedef struct hsa_agent_s hsa_agent_t
 Struct containing an opaque handle to an agent, a device that participates in the HSA memory model. More...
 
typedef struct hsa_cache_s hsa_cache_t
 Cache handle. More...
 

Enumerations

enum  hsa_endianness_t { HSA_ENDIANNESS_LITTLE = 0, HSA_ENDIANNESS_BIG = 1 }
 Endianness. More...
 
enum  hsa_machine_model_t { HSA_MACHINE_MODEL_SMALL = 0, HSA_MACHINE_MODEL_LARGE = 1 }
 Machine model. More...
 
enum  hsa_profile_t { HSA_PROFILE_BASE = 0, HSA_PROFILE_FULL = 1 }
 Profile. More...
 
enum  hsa_system_info_t {
  HSA_SYSTEM_INFO_VERSION_MAJOR = 0, HSA_SYSTEM_INFO_VERSION_MINOR = 1, HSA_SYSTEM_INFO_TIMESTAMP = 2, HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY = 3,
  HSA_SYSTEM_INFO_SIGNAL_MAX_WAIT = 4, HSA_SYSTEM_INFO_ENDIANNESS = 5, HSA_SYSTEM_INFO_MACHINE_MODEL = 6, HSA_SYSTEM_INFO_EXTENSIONS = 7
}
 System attributes. More...
 
enum  hsa_extension_t {
  HSA_EXTENSION_FINALIZER = 0, HSA_EXTENSION_IMAGES = 1, HSA_EXTENSION_PERFORMANCE_COUNTERS = 2, HSA_EXTENSION_PROFILING_EVENTS = 3,
  HSA_EXTENSION_STD_LAST = 3, HSA_AMD_FIRST_EXTENSION = 0x200, HSA_EXTENSION_AMD_PROFILER = 0x200, HSA_EXTENSION_AMD_LOADER = 0x201,
  HSA_AMD_LAST_EXTENSION = 0x201
}
 HSA extensions. More...
 
enum  hsa_agent_feature_t { HSA_AGENT_FEATURE_KERNEL_DISPATCH = 1, HSA_AGENT_FEATURE_AGENT_DISPATCH = 2 }
 Agent features. More...
 
enum  hsa_device_type_t { HSA_DEVICE_TYPE_CPU = 0, HSA_DEVICE_TYPE_GPU = 1, HSA_DEVICE_TYPE_DSP = 2 }
 Hardware device type. More...
 
enum  hsa_default_float_rounding_mode_t { HSA_DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT = 0, HSA_DEFAULT_FLOAT_ROUNDING_MODE_ZERO = 1, HSA_DEFAULT_FLOAT_ROUNDING_MODE_NEAR = 2 }
 Default floating-point rounding mode. More...
 
enum  hsa_agent_info_t {
  HSA_AGENT_INFO_NAME = 0, HSA_AGENT_INFO_VENDOR_NAME = 1, HSA_AGENT_INFO_FEATURE = 2, HSA_AGENT_INFO_MACHINE_MODEL = 3,
  HSA_AGENT_INFO_PROFILE = 4, HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE = 5, HSA_AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES = 23, HSA_AGENT_INFO_FAST_F16_OPERATION = 24,
  HSA_AGENT_INFO_WAVEFRONT_SIZE = 6, HSA_AGENT_INFO_WORKGROUP_MAX_DIM = 7, HSA_AGENT_INFO_WORKGROUP_MAX_SIZE = 8, HSA_AGENT_INFO_GRID_MAX_DIM = 9,
  HSA_AGENT_INFO_GRID_MAX_SIZE = 10, HSA_AGENT_INFO_FBARRIER_MAX_SIZE = 11, HSA_AGENT_INFO_QUEUES_MAX = 12, HSA_AGENT_INFO_QUEUE_MIN_SIZE = 13,
  HSA_AGENT_INFO_QUEUE_MAX_SIZE = 14, HSA_AGENT_INFO_QUEUE_TYPE = 15, HSA_AGENT_INFO_NODE = 16, HSA_AGENT_INFO_DEVICE = 17,
  HSA_AGENT_INFO_CACHE_SIZE = 18, HSA_AGENT_INFO_ISA = 19, HSA_AGENT_INFO_EXTENSIONS = 20, HSA_AGENT_INFO_VERSION_MAJOR = 21,
  HSA_AGENT_INFO_VERSION_MINOR = 22
}
 Agent attributes. More...
 
enum  hsa_exception_policy_t { HSA_EXCEPTION_POLICY_BREAK = 1, HSA_EXCEPTION_POLICY_DETECT = 2 }
 Exception policies applied in the presence of hardware exceptions. More...
 
enum  hsa_cache_info_t { HSA_CACHE_INFO_NAME_LENGTH = 0, HSA_CACHE_INFO_NAME = 1, HSA_CACHE_INFO_LEVEL = 2, HSA_CACHE_INFO_SIZE = 3 }
 Cache attributes. More...
 

Functions

hsa_status_t HSA_API hsa_system_get_info (hsa_system_info_t attribute, void *value)
 Get the current value of a system attribute. More...
 
hsa_status_t HSA_API hsa_extension_get_name (uint16_t extension, const char **name)
 Query the name of a given extension. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 iteration. More...
 
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. More...
 
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. More...
 

Detailed Description

Typedef Documentation

◆ hsa_agent_t

typedef struct hsa_agent_s hsa_agent_t

Struct containing an opaque handle to an agent, a device that participates in the HSA memory model.

An agent can submit AQL packets for execution, and may also accept AQL packets for execution (agent dispatch packets or kernel dispatch packets launching HSAIL-derived binaries).

◆ hsa_cache_t

typedef struct hsa_cache_s hsa_cache_t

Cache handle.

Enumeration Type Documentation

◆ hsa_agent_feature_t

Agent features.

Enumerator
HSA_AGENT_FEATURE_KERNEL_DISPATCH 

The agent supports AQL packets of kernel dispatch type.

If this feature is enabled, the agent is also a kernel agent.

HSA_AGENT_FEATURE_AGENT_DISPATCH 

The agent supports AQL packets of agent dispatch type.

Definition at line 722 of file hsa.h.

◆ hsa_agent_info_t

Agent attributes.

Enumerator
HSA_AGENT_INFO_NAME 

Agent name.

The type of this attribute is a NUL-terminated char[64]. The name must be at most 63 characters long (not including the NUL terminator) and all array elements not used for the name must be NUL.

HSA_AGENT_INFO_VENDOR_NAME 

Name of vendor.

The type of this attribute is a NUL-terminated char[64]. The name must be at most 63 characters long (not including the NUL terminator) and all array elements not used for the name must be NUL.

HSA_AGENT_INFO_FEATURE 

Agent capability.

The type of this attribute is hsa_agent_feature_t.

HSA_AGENT_INFO_MACHINE_MODEL 
Deprecated:
Query HSA_ISA_INFO_MACHINE_MODELS for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Machine model supported by the agent. The type of this attribute is hsa_machine_model_t.

HSA_AGENT_INFO_PROFILE 
Deprecated:
Query HSA_ISA_INFO_PROFILES for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Profile supported by the agent. The type of this attribute is hsa_profile_t.

HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE 
Deprecated:
Query HSA_ISA_INFO_DEFAULT_FLOAT_ROUNDING_MODES for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Default floating-point rounding mode. The type of this attribute is hsa_default_float_rounding_mode_t, but the value HSA_DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT is not allowed.

HSA_AGENT_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES 
Deprecated:
Query HSA_ISA_INFO_BASE_PROFILE_DEFAULT_FLOAT_ROUNDING_MODES for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

A bit-mask of hsa_default_float_rounding_mode_t values, representing the default floating-point rounding modes supported by the agent in the Base profile. The type of this attribute is uint32_t. The default floating-point rounding mode (HSA_AGENT_INFO_DEFAULT_FLOAT_ROUNDING_MODE) bit must not be set.

HSA_AGENT_INFO_FAST_F16_OPERATION 
Deprecated:
Query HSA_ISA_INFO_FAST_F16_OPERATION for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Flag indicating that the f16 HSAIL operation is at least as fast as the f32 operation in the current agent. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is bool.

HSA_AGENT_INFO_WAVEFRONT_SIZE 
Deprecated:
Query HSA_WAVEFRONT_INFO_SIZE for a given wavefront and intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas and the first wavefront enumerated by hsa_isa_iterate_wavefronts for that ISA.

Number of work-items in a wavefront. Must be a power of 2 in the range [1,256]. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is uint32_t.

HSA_AGENT_INFO_WORKGROUP_MAX_DIM 
Deprecated:
Query HSA_ISA_INFO_WORKGROUP_MAX_DIM for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Maximum number of work-items of each dimension of a work-group. Each maximum must be greater than 0. No maximum can exceed the value of HSA_AGENT_INFO_WORKGROUP_MAX_SIZE. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is uint16_t[3].

HSA_AGENT_INFO_WORKGROUP_MAX_SIZE 
Deprecated:
Query HSA_ISA_INFO_WORKGROUP_MAX_SIZE for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Maximum total number of work-items in a work-group. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is uint32_t.

HSA_AGENT_INFO_GRID_MAX_DIM 
Deprecated:
Query HSA_ISA_INFO_GRID_MAX_DIM for a given intruction set architecture supported by the agent instead.

Maximum number of work-items of each dimension of a grid. Each maximum must be greater than 0, and must not be smaller than the corresponding value in HSA_AGENT_INFO_WORKGROUP_MAX_DIM. No maximum can exceed the value of HSA_AGENT_INFO_GRID_MAX_SIZE. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is hsa_dim3_t.

HSA_AGENT_INFO_GRID_MAX_SIZE 
Deprecated:
Query HSA_ISA_INFO_GRID_MAX_SIZE for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Maximum total number of work-items in a grid. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is uint32_t.

HSA_AGENT_INFO_FBARRIER_MAX_SIZE 
Deprecated:
Query HSA_ISA_INFO_FBARRIER_MAX_SIZE for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Maximum number of fbarriers per work-group. Must be at least 32. The value of this attribute is undefined if the agent is not a kernel agent. The type of this attribute is uint32_t.

HSA_AGENT_INFO_QUEUES_MAX 
Deprecated:
The maximum number of queues is not statically determined.

Maximum number of queues that can be active (created but not destroyed) at one time in the agent. The type of this attribute is uint32_t.

HSA_AGENT_INFO_QUEUE_MIN_SIZE 

Minimum number of packets that a queue created in the agent can hold.

Must be a power of 2 greater than 0. Must not exceed the value of HSA_AGENT_INFO_QUEUE_MAX_SIZE. The type of this attribute is uint32_t.

HSA_AGENT_INFO_QUEUE_MAX_SIZE 

Maximum number of packets that a queue created in the agent can hold.

Must be a power of 2 greater than 0. The type of this attribute is uint32_t.

HSA_AGENT_INFO_QUEUE_TYPE 

Type of a queue created in the agent.

The type of this attribute is hsa_queue_type32_t.

HSA_AGENT_INFO_NODE 
Deprecated:
NUMA information is not exposed anywhere else in the API.

Identifier of the NUMA node associated with the agent. The type of this attribute is uint32_t.

HSA_AGENT_INFO_DEVICE 

Type of hardware device associated with the agent.

The type of this attribute is hsa_device_type_t.

HSA_AGENT_INFO_CACHE_SIZE 
Deprecated:
Query hsa_agent_iterate_caches to retrieve information about the caches present in a given agent.

Array of data cache sizes (L1..L4). Each size is expressed in bytes. A size of 0 for a particular level indicates that there is no cache information for that level. The type of this attribute is uint32_t[4].

HSA_AGENT_INFO_ISA 
Deprecated:
An agent may support multiple instruction set architectures.

See hsa_agent_iterate_isas. If more than one ISA is supported by the agent, the returned value corresponds to the first ISA enumerated by hsa_agent_iterate_isas.

Instruction set architecture of the agent. The type of this attribute is hsa_isa_t.

HSA_AGENT_INFO_EXTENSIONS 

Bit-mask indicating which extensions are supported by the agent.

An extension with an ID of i is supported if the bit at position i is set. The type of this attribute is uint8_t[128].

HSA_AGENT_INFO_VERSION_MAJOR 

Major version of the HSA runtime specification supported by the agent.

The type of this attribute is uint16_t.

HSA_AGENT_INFO_VERSION_MINOR 

Minor version of the HSA runtime specification supported by the agent.

The type of this attribute is uint16_t.

Definition at line 776 of file hsa.h.

◆ hsa_cache_info_t

Cache attributes.

Enumerator
HSA_CACHE_INFO_NAME_LENGTH 

The length of the cache name in bytes, not including the NUL terminator.

The type of this attribute is uint32_t.

HSA_CACHE_INFO_NAME 

Human-readable description.

The type of this attribute is a NUL-terminated character array with the length equal to the value of HSA_CACHE_INFO_NAME_LENGTH attribute.

HSA_CACHE_INFO_LEVEL 

Cache level.

A L1 cache must return a value of 1, a L2 must return a value of 2, and so on. The type of this attribute is uint8_t.

HSA_CACHE_INFO_SIZE 

Cache size, in bytes.

A value of 0 indicates that there is no size information available. The type of this attribute is uint32_t.

Definition at line 1122 of file hsa.h.

◆ hsa_default_float_rounding_mode_t

Default floating-point rounding mode.

Enumerator
HSA_DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT 

Use a default floating-point rounding mode specified elsewhere.

HSA_DEFAULT_FLOAT_ROUNDING_MODE_ZERO 

Operations that specify the default floating-point mode are rounded to zero by default.

HSA_DEFAULT_FLOAT_ROUNDING_MODE_NEAR 

Operations that specify the default floating-point mode are rounded to the nearest representable number and that ties should be broken by selecting the value with an even least significant bit.

Definition at line 755 of file hsa.h.

◆ hsa_device_type_t

Hardware device type.

Enumerator
HSA_DEVICE_TYPE_CPU 

CPU device.

HSA_DEVICE_TYPE_GPU 

GPU device.

HSA_DEVICE_TYPE_DSP 

DSP device.

Definition at line 737 of file hsa.h.

◆ hsa_endianness_t

Endianness.

A convention used to interpret the bytes making up a data word.

Enumerator
HSA_ENDIANNESS_LITTLE 

The least significant byte is stored in the smallest address.

HSA_ENDIANNESS_BIG 

The most significant byte is stored in the smallest address.

Definition at line 390 of file hsa.h.

◆ hsa_exception_policy_t

Exception policies applied in the presence of hardware exceptions.

Enumerator
HSA_EXCEPTION_POLICY_BREAK 

If a hardware exception is detected, a work-item signals an exception.

HSA_EXCEPTION_POLICY_DETECT 

If a hardware exception is detected, a hardware status bit is set.

Definition at line 1065 of file hsa.h.

◆ hsa_extension_t

HSA extensions.

Enumerator
HSA_EXTENSION_FINALIZER 

Finalizer extension.

HSA_EXTENSION_IMAGES 

Images extension.

HSA_EXTENSION_PERFORMANCE_COUNTERS 

Performance counter extension.

HSA_EXTENSION_PROFILING_EVENTS 

Profiling events extension.

HSA_EXTENSION_STD_LAST 

Extension count.

HSA_AMD_FIRST_EXTENSION 

First AMD extension number.

HSA_EXTENSION_AMD_PROFILER 

Profiler extension.

HSA_EXTENSION_AMD_LOADER 

Loader extension.

HSA_AMD_LAST_EXTENSION 

Last AMD extension.

Definition at line 503 of file hsa.h.

◆ hsa_machine_model_t

Machine model.

A machine model determines the size of certain data types in HSA runtime and an agent.

Enumerator
HSA_MACHINE_MODEL_SMALL 

Small machine model.

Addresses use 32 bits.

HSA_MACHINE_MODEL_LARGE 

Large machine model.

Addresses use 64 bits.

Definition at line 405 of file hsa.h.

◆ hsa_profile_t

Profile.

A profile indicates a particular level of feature support. For example, in the base profile the application must use the HSA runtime allocator to reserve shared virtual memory, while in the full profile any host pointer can be shared across all the agents.

Enumerator
HSA_PROFILE_BASE 

Base profile.

HSA_PROFILE_FULL 

Full profile.

Definition at line 422 of file hsa.h.

◆ hsa_system_info_t

System attributes.

Enumerator
HSA_SYSTEM_INFO_VERSION_MAJOR 

Major version of the HSA runtime specification supported by the implementation.

The type of this attribute is uint16_t.

HSA_SYSTEM_INFO_VERSION_MINOR 

Minor version of the HSA runtime specification supported by the implementation.

The type of this attribute is uint16_t.

HSA_SYSTEM_INFO_TIMESTAMP 

Current timestamp.

The value of this attribute monotonically increases at a constant rate. The type of this attribute is uint64_t.

HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY 

Timestamp value increase rate, in Hz.

The timestamp (clock) frequency is in the range 1-400MHz. The type of this attribute is uint64_t.

HSA_SYSTEM_INFO_SIGNAL_MAX_WAIT 

Maximum duration of a signal wait operation.

Expressed as a count based on the timestamp frequency. The type of this attribute is uint64_t.

HSA_SYSTEM_INFO_ENDIANNESS 

Endianness of the system.

The type of this attribute is hsa_endianness_t.

HSA_SYSTEM_INFO_MACHINE_MODEL 

Machine model supported by the HSA runtime.

The type of this attribute is hsa_machine_model_t.

HSA_SYSTEM_INFO_EXTENSIONS 

Bit-mask indicating which extensions are supported by the implementation.

An extension with an ID of i is supported if the bit at position i is set. The type of this attribute is uint8_t[128].

Definition at line 436 of file hsa.h.

Function Documentation

◆ hsa_agent_extension_supported()

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.

Deprecated:
Parameters
[in]extensionExtension identifier.
[in]agentAgent.
[in]version_majorMajor version number.
[in]version_minorMinor version number.
[out]resultPointer to a memory location where the HSA runtime stores the result of the check. The result is true if the specified version of the extension is supported, and false otherwise. The result must be false if hsa_system_extension_supported returns false for the same extension version.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_AGENTThe agent is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or result is NULL.

◆ hsa_agent_get_exception_policies()

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.

Deprecated:
Use hsa_isa_get_exception_policies for a given intruction set architecture supported by the agent instead.

If more than one ISA is supported by the agent, this function uses the first value returned by hsa_agent_iterate_isas.

Parameters
[in]agentAgent.
[in]profileProfile.
[out]maskPointer to a memory location where the HSA runtime stores a mask of hsa_exception_policy_t values. Must not be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_AGENTThe agent is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTprofile is not a valid profile, or mask is NULL.

◆ hsa_agent_get_info()

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.

Parameters
[in]agentA valid agent.
[in]attributeAttribute to query.
[out]valuePointer to an application-allocated buffer where to store the value of the attribute. If the buffer passed by the application is not large enough to hold the value of attribute, the behavior is undefined.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_AGENTThe agent is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTattribute is an invalid agent attribute, or value is NULL.

◆ hsa_agent_iterate_caches()

hsa_status_t HSA_API hsa_agent_iterate_caches ( hsa_agent_t  agent,
hsa_status_t(*)(hsa_cache_t cache, void *data callback,
void *  data 
)

Iterate over the memory caches of a given agent, and invoke an application-defined callback on every iteration.

Caches are visited in ascending order according to the value of the HSA_CACHE_INFO_LEVEL attribute.

Parameters
[in]agentA valid agent.
[in]callbackCallback to be invoked once per cache that is present in the agent. The HSA runtime passes two arguments to the callback: the cache and the application data. If callback returns a status other than HSA_STATUS_SUCCESS for a particular iteration, the traversal stops and that value is returned.
[in]dataApplication data that is passed to callback on every iteration. May be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_AGENTThe agent is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTcallback is NULL.

◆ hsa_agent_major_extension_supported()

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.

All minor versions from 0 up to the returned version_minor must be supported.

Parameters
[in]extensionExtension identifier.
[in]agentAgent.
[in]version_majorMajor version number.
[out]version_minorMinor version number.
[out]resultPointer to a memory location where the HSA runtime stores the result of the check. The result is true if the specified version of the extension is supported, and false otherwise. The result must be false if hsa_system_extension_supported returns false for the same extension version.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_AGENTThe agent is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or version_minor is NULL, or result is NULL.

◆ hsa_cache_get_info()

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.

Parameters
[in]cacheCache.
[in]attributeAttribute to query.
[out]valuePointer to an application-allocated buffer where to store the value of the attribute. If the buffer passed by the application is not large enough to hold the value of attribute, the behavior is undefined.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_CACHEThe cache is invalid.
HSA_STATUS_ERROR_INVALID_ARGUMENTattribute is an invalid instruction set architecture attribute, or value is NULL.

◆ hsa_extension_get_name()

hsa_status_t HSA_API hsa_extension_get_name ( uint16_t  extension,
const char **  name 
)

Query the name of a given extension.

Parameters
[in]extensionExtension identifier. If the extension is not supported by the implementation (see HSA_SYSTEM_INFO_EXTENSIONS), the behavior is undefined.
[out]namePointer to a memory location where the HSA runtime stores the extension name. The extension name is a NUL-terminated string.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or name is NULL.

◆ hsa_iterate_agents()

hsa_status_t HSA_API hsa_iterate_agents ( hsa_status_t(*)(hsa_agent_t agent, void *data callback,
void *  data 
)

Iterate over the available agents, and invoke an application-defined callback on every iteration.

Parameters
[in]callbackCallback to be invoked once per agent. The HSA runtime passes two arguments to the callback: the agent and the application data. If callback returns a status other than HSA_STATUS_SUCCESS for a particular iteration, the traversal stops and hsa_iterate_agents returns that status value.
[in]dataApplication data that is passed to callback on every iteration. May be NULL.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTcallback is NULL.

◆ hsa_system_extension_supported()

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.

Deprecated:
Parameters
[in]extensionExtension identifier.
[in]version_majorMajor version number.
[in]version_minorMinor version number.
[out]resultPointer to a memory location where the HSA runtime stores the result of the check. The result is true if the specified version of the extension is supported, and false otherwise.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or result is NULL.

◆ hsa_system_get_extension_table()

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.

Deprecated:

Portable applications are expected to invoke the extension API using the returned function pointers

The application is responsible for verifying that the given version of the extension is supported by the HSA implementation (see hsa_system_extension_supported). If the given combination of extension, major version, and minor version is not supported by the implementation, the behavior is undefined.

Parameters
[in]extensionExtension identifier.
[in]version_majorMajor version number for which to retrieve the function pointer table.
[in]version_minorMinor version number for which to retrieve the function pointer table.
[out]tablePointer to an application-allocated function pointer table that is populated by the HSA runtime. Must not be NULL. The memory associated with table can be reused or freed after the function returns.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or table is NULL.

◆ hsa_system_get_info()

hsa_status_t HSA_API hsa_system_get_info ( hsa_system_info_t  attribute,
void *  value 
)

Get the current value of a system attribute.

Parameters
[in]attributeAttribute to query.
[out]valuePointer to an application-allocated buffer where to store the value of the attribute. If the buffer passed by the application is not large enough to hold the value of attribute, the behavior is undefined.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTattribute is an invalid system attribute, or value is NULL.

◆ hsa_system_get_major_extension_table()

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.

Portable applications are expected to invoke the extension API using the returned function pointers.

The application is responsible for verifying that the given major version of the extension is supported by the HSA implementation (see hsa_system_major_extension_supported). If the given combination of extension and major version is not supported by the implementation, the behavior is undefined. Additionally if the length doesn't allow space for a full minor version, it is implementation defined if only some of the function pointers for that minor version get written.

Parameters
[in]extensionExtension identifier.
[in]version_majorMajor version number for which to retrieve the function pointer table.
[in]table_lengthSize in bytes of the function pointer table to be populated. The implementation will not write more than this many bytes to the table.
[out]tablePointer to an application-allocated function pointer table that is populated by the HSA runtime. Must not be NULL. The memory associated with table can be reused or freed after the function returns.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or table is NULL.

◆ hsa_system_major_extension_supported()

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.

All minor versions from 0 up to the returned version_minor must be supported by the implementation.

Parameters
[in]extensionExtension identifier.
[in]version_majorMajor version number.
[out]version_minorMinor version number.
[out]resultPointer to a memory location where the HSA runtime stores the result of the check. The result is true if the specified version of the extension is supported, and false otherwise.
Return values
HSA_STATUS_SUCCESSThe function has been executed successfully.
HSA_STATUS_ERROR_NOT_INITIALIZEDThe HSA runtime has not been initialized.
HSA_STATUS_ERROR_INVALID_ARGUMENTextension is not a valid extension, or version_minor is NULL, or result is NULL.

Generated on Wed Sep 30 2020 14:02:19 for gem5 by doxygen 1.8.17