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

Exact XDNA deployment profiles for target specialization. More...

Go to the source code of this file.

Functions

loomc_status_t loomc_target_profile_create_xdna (loomc_target_environment_t *target_environment, loomc_string_view_t device_key, loomc_allocator_t allocator, loomc_target_profile_t **out_profile)
 Creates an immutable profile for a supported AIE2P device key.

Detailed Description

Exact XDNA deployment profiles for target specialization.

Function Documentation

◆ loomc_target_profile_create_xdna()

loomc_status_t loomc_target_profile_create_xdna ( loomc_target_environment_t * target_environment,
loomc_string_view_t device_key,
loomc_allocator_t allocator,
loomc_target_profile_t ** out_profile )

Creates an immutable profile for a supported AIE2P device key.

The key identifies the array geometry and register/configuration ABI, for example amd.xdna.strix_halo.17f0_11. This is an offline lookup; it does not probe hardware. Unknown keys fail instead of assuming a compatible device. Supply the profile through ordinary loomc_target_specialization_options_t function or target-declaration bindings. The compiled function versions retain their device facts through emission, so no separate emit profile is needed.

Parameters
target_environmentEnvironment containing the AIE2P target package.
device_keyExact device key; the view need not be NUL-terminated.
allocatorHost allocator used for the profile handle.
out_profileReceives one retained profile on success, NULL on failure.
Returns
OK on success; invalid argument for an unsupported key or environment.
Ownership
The caller releases the returned reference with loomc_target_profile_release. The profile copies the device key and retains the target environment. The profile is immutable and may be reused across threads and compilations.