Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
iree_hal.h File Reference

AMDGPU target profiles from IREE HAL devices. More...

Go to the source code of this file.

Data Structures

struct  loomc_amdgpu_iree_hal_profile_options_t
 AMDGPU profile options for an IREE HAL device. More...

Functions

loomc_status_t loomc_target_profile_create_amdgpu_iree_hal (loomc_target_environment_t *target_environment, const loomc_amdgpu_iree_hal_profile_options_t *options, loomc_allocator_t allocator, loomc_target_profile_t **out_profile, loomc_result_t **out_result)
 Creates an exact AMDGPU target profile from an IREE HAL device.
const loomc_iree_hal_profile_provider_tloomc_amdgpu_iree_hal_profile_provider (void)
 Returns the generic IREE HAL router provider for AMDGPU devices.

Detailed Description

AMDGPU target profiles from IREE HAL devices.

This optional leaf projects the canonical exact AMDGPU executable target advertised by an IREE HAL device into Loom's structured AMDGPU target profile. Target selectors and AMDHSA feature modes are parsed at the HAL family boundary and remain structured in the resulting profile.

A logical device containing heterogeneous physical devices must identify the physical-device set being compiled for. Omitting affinity is valid only when the logical device advertises one unambiguous highest-priority exact AMDGPU target.

Function Documentation

◆ loomc_amdgpu_iree_hal_profile_provider()

const loomc_iree_hal_profile_provider_t * loomc_amdgpu_iree_hal_profile_provider ( void )

Returns the generic IREE HAL router provider for AMDGPU devices.

Returns
Process-lifetime provider descriptor. The returned pointer is immutable and may be placed directly in a loomc_iree_hal_profile_options_t::providers array.

◆ loomc_target_profile_create_amdgpu_iree_hal()

loomc_status_t loomc_target_profile_create_amdgpu_iree_hal ( loomc_target_environment_t * target_environment,
const loomc_amdgpu_iree_hal_profile_options_t * options,
loomc_allocator_t allocator,
loomc_target_profile_t ** out_profile,
loomc_result_t ** out_result )

Creates an exact AMDGPU target profile from an IREE HAL device.

The adapter selects one exact amdgpu executable target from the device specification, parses its canonical target key into target identity and AMDHSA feature states, and creates an ordinary AMDGPU profile.

Parameters
target_environmentAMDGPU target environment that will own the profile.
optionsAMDGPU IREE HAL profile options.
allocatorHost allocator used for result and profile storage.
out_profileReceives one retained profile when the result succeeds. Receives NULL on failed result.
out_resultReceives a retained result containing adapter diagnostics.
Returns
OK when profile creation completed far enough to report a result. Non-OK statuses represent API misuse or infrastructure failures before a result could be produced.
Ownership
The caller owns out_result on an OK return and releases it with loomc_result_release. When a profile is produced, the caller owns the returned reference and releases it with loomc_target_profile_release.
Thread safety
The adapter holds no mutable process-global state. It may be called concurrently for different invocations. The supplied HAL device must satisfy its own thread-safety contract.