Targets#
2026-11-05
2 min read time
target#
-
struct target#
An interface for a compilation target.
Public Functions
-
std::string name() const#
A unique name used to identify the target.
-
std::vector<pass> get_passes(context &ctx, const compile_options &options) const#
The transformation pass to be run during compilation.
- Parameters:
ctx – This is the target-dependent context that is created by
get_contextoptions – Compiling options passed in by the user
- Returns:
The passes to be ran
-
std::vector<pass> get_recompile_passes(context &ctx, const compile_options &options) const#
The passes that recompile the kernels of an already compiled program, used by program::recompile. Targets that cannot recompile throw.
- Parameters:
ctx – The context of the device to recompile for
options – Compiling options passed in by the user
- Returns:
The passes to be run
-
context get_context() const#
Construct a context for the target.
- Returns:
The context to be used during compilation and execution.
-
supported_segments target_is_supported(T&, const_module_ref mod, support_metric metric) const#
Get the ranges of instructions that are supported on a target.
- Parameters:
module – Module to check for supported instructions
metric – Used to define how the quality of the support should be measured
- Returns:
the supported segments of the graph
-
argument copy_to(const argument &arg) const#
copy an argument to the current target.
- Parameters:
arg – Input argument to be copied to the target
- Returns:
Argument in the target.
-
std::string name() const#
gpu::target#
-
struct target#
Public Functions
-
inline bool is_cross_compile() const#
-
std::string name() const#
-
std::vector<pass> get_recompile_passes(migraphx::context &gctx, const compile_options &options) const#
-
migraphx::context get_context() const#
Public Members
-
device_description desc = {}#
The device to compile for. An empty arch means use the local device.
-
inline bool is_cross_compile() const#
cpu::target#
-
struct target#