9 #ifndef MLIR_DIALECT_GPU_PIPELINES_PASSES_H_
10 #define MLIR_DIALECT_GPU_PIPELINES_PASSES_H_
21 *
this,
"index-bitwidth",
22 llvm::cl::desc(
"Bitwidth of the index type for the host (warning this "
23 "should be 64 until the GPU layering is fixed)"),
26 *
this,
"cubin-triple",
27 llvm::cl::desc(
"Triple to use to serialize to cubin."),
28 llvm::cl::init(
"nvptx64-nvidia-cuda")};
30 *
this,
"cubin-chip", llvm::cl::desc(
"Chip to use to serialize to cubin."),
31 llvm::cl::init(
"sm_50")};
33 *
this,
"cubin-features",
34 llvm::cl::desc(
"Features to use to serialize to cubin."),
35 llvm::cl::init(
"+ptx60")};
37 *
this,
"cubin-format",
38 llvm::cl::desc(
"Compilation format to use to serialize to cubin."),
39 llvm::cl::init(
"fatbin")};
41 *
this,
"ptxas-cmd-options",
43 "Command line options to pass to the downstream compiler."),
47 llvm::cl::desc(
"Optimization level for NVVM compilation"),
50 *
this,
"kernel-bare-ptr-calling-convention",
52 "Whether to use the bareptr calling convention on the kernel "
53 "(warning this should be false until the GPU layering is fixed)"),
54 llvm::cl::init(
false)};
56 *
this,
"host-bare-ptr-calling-convention",
58 "Whether to use the bareptr calling convention on the host (warning "
59 "this should be false until the GPU layering is fixed)"),
60 llvm::cl::init(
false)};
67 *
this,
"xegpu-op-level",
68 llvm::cl::desc(
"Granularity of XeGPU operations to target: workgroup | "
70 llvm::cl::init(
"workgroup")};
73 *
this,
"use-64bit-index",
74 llvm::cl::desc(
"Bitwidth of the index type (host & device)"),
75 llvm::cl::init(
true)};
77 *
this,
"kernel-bare-ptr-calling-convention",
78 llvm::cl::desc(
"Use bare pointer calling convention for device kernels"),
79 llvm::cl::init(
false)};
81 *
this,
"host-bare-ptr-calling-convention",
82 llvm::cl::desc(
"Use bare pointer calling convention for host launches"),
83 llvm::cl::init(
false)};
85 *
this,
"binary-format",
86 llvm::cl::desc(
"Final GPU binary emission format (e.g. fatbin)"),
87 llvm::cl::init(
"fatbin")};
90 *
this,
"xevm-module-matcher",
91 llvm::cl::desc(
"Regex to match gpu.module names for XeVM target attach"),
94 *
this,
"zebin-triple", llvm::cl::desc(
"Target triple for XeVM codegen"),
95 llvm::cl::init(
"spirv64-unknown-unknown")};
97 *
this,
"zebin-chip", llvm::cl::desc(
"Target chip (e.g. pvc, bmg)"),
98 llvm::cl::init(
"bmg")};
101 llvm::cl::desc(
"Optimization level for attached target/codegen"),
104 *
this,
"igc-cmd-options",
105 llvm::cl::desc(
"Additional downstream compiler command line options"),
117 const GPUToNVVMPipelineOptions &
options);
123 const GPUToXeVMPipelineOptions &
options);
static llvm::ManagedStatic< PassManagerOptions > options
This class represents a pass manager that runs passes on either a specific operation type,...
Subclasses of PassPipelineOptions provide a set of options that can be used to initialize a pass pipe...
void registerGPUToNVVMPipeline()
Register all pipelines for the gpu dialect.
void registerGPUToXeVMPipeline()
void buildLowerToXeVMPassPipeline(OpPassManager &pm, const GPUToXeVMPipelineOptions &options)
Adds the GPU to XeVM pipeline to the given pass manager.
void buildLowerToNVVMPassPipeline(OpPassManager &pm, const GPUToNVVMPipelineOptions &options)
Adds the GPU to NVVM pipeline to the given pass manager.
Include the generated interface declarations.
Options for the gpu to nvvm pipeline.
PassOptions::Option< std::string > cubinChip
PassOptions::Option< int > optLevel
PassOptions::Option< bool > hostUseBarePtrCallConv
PassOptions::Option< std::string > cmdOptions
PassOptions::Option< std::string > cubinFeatures
PassOptions::Option< std::string > cubinFormat
PassOptions::Option< int64_t > indexBitWidth
PassOptions::Option< std::string > cubinTriple
PassOptions::Option< bool > kernelUseBarePtrCallConv
PassOptions::Option< bool > hostBarePtrCallConv
PassOptions::Option< unsigned > optLevel
PassOptions::Option< std::string > xegpuOpLevel
PassOptions::Option< std::string > xevmModuleMatcher
PassOptions::Option< std::string > zebinTriple
PassOptions::Option< bool > kernelBarePtrCallConv
PassOptions::Option< std::string > binaryFormat
PassOptions::Option< std::string > cmdOptions
PassOptions::Option< bool > use64bitIndex
PassOptions::Option< std::string > zebinChip