MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
ll_nvptx.cpp File Reference
#include "mim/plug/ll_nvptx/phase/ll_nvptx.h"
#include <fe/sys.h>
#include <mim/driver.h>
#include <mim/plugin.h>
#include <mim/plug/gpu/gpu.h>
#include "mim/plug/ll_nvptx/ll_nvptx.h"
Include dependency graph for ll_nvptx.cpp:

Go to the source code of this file.

Classes

class  mim::plug::ll_nvptx::Emit

Namespaces

namespace  mim
namespace  mim::plug
namespace  mim::plug::ll_nvptx
 The ll_nvptx Plugin

Functions

static void reg_phases (Flags2Phases &phases)
Plugin mim_get_plugin ()

Variables

static constexpr PluginArg known_args []
static constexpr PluginEnv known_envs []

Function Documentation

◆ mim_get_plugin()

◆ reg_phases()

void reg_phases ( Flags2Phases & phases)
static

Definition at line 234 of file ll_nvptx.cpp.

References mim::Phase::hook(), and reg_phases().

Variable Documentation

◆ known_args

PluginArg known_args[]
staticconstexpr
Initial value:
= {
{"o=<file>, output=<file>", "Writes the host LLVM IR to `<file>` instead of the default `<world>.ll`/`a.ll`; `<file>` may be `-` for stdout."},
{"o-dev=<file>, output-dev=<file>", "Writes the device LLVM IR to `<file>` instead of the default `<world>_dev.ll`/`a_dev.ll`; `<file>` may be `-` for stdout."},
{"rt=embed, rt=extern", "Like `ll`'s `rt`, but for the host module's C [runtime wrappers](@ref plugin_runtime) such as `@mim_cu_check`."},
{"embed, no-embed", "Embeds the compiled device binary into the host LLVM IR, or doesn't; the default is `embed` on Linux and `no-embed` elsewhere."},
{"no-ptx-embed", "When embedding: omits the PTX image from the fat binary (default: both PTX and CUBIN)."},
{"no-cubin-embed", "When embedding: omits the CUBIN image from the fat binary (default: both PTX and CUBIN)."},
{"sm=<SM>", "When embedding: compiles the device binary for compute capability `sm_<SM>`."},
{"libdevice=<path>", "When embedding and linking libdevice: uses the NVVM library at `<path>` instead of locating it via the CUDA paths."},
{"Xlink_llvm=<args>", "When embedding and linking libdevice: passes `<args>` to `link_llvm` (default: none)."},
{"Xopt=<args>", "When embedding and linking libdevice: passes `<args>` to `opt` (default: `-passes=\"default<O2>,nvvm-reflect\"`)."},
{"Xllc=<args>", "When embedding: passes `<args>` to `llc` (default: none)."},
{"Xptxas=<args>", "When embedding: passes `<args>` to `ptxas` (default: none); also passed to `fatbinary` via `--cmdline` when the PTX image is embedded."},
{"Xfatbinary=<args>", "When embedding: passes `<args>` to `fatbinary` (default: none)."},
}

Definition at line 237 of file ll_nvptx.cpp.

Referenced by mim_get_plugin().

◆ known_envs

PluginEnv known_envs[]
staticconstexpr
Initial value:
= {
{"CUDA_HOME", "Root of the CUDA installation to locate `libdevice` in, if the CUDA paths do not yield one."},
}

Definition at line 253 of file ll_nvptx.cpp.

Referenced by mim_get_plugin().