pub struct GPUModuleOperation<'c> { /* private fields */ }
Expand description
A module
operation. A top level compilation unit containing code to be run on a GPU..
GPU module contains code that is intended to be run on a GPU. A host device can launch this code through a gpu.launc_func that creates a fully qualified symbol through the gpu.module’s symbol and a gpu.func symbol contained in the gpu.module.
The module’s top-level scope is modeled by a single region with a single block. GPU modules are required to have a name that is used for symbol resolution by the gpu.launch_func operation.
Using an op with a region to define a GPU module enables “embedding” GPU modules with SIMT execution models in other dialects in a clean manner and allows filtering of code regions to execute passes on only code intended to or not intended to be run on the separate device.
gpu.module @symbol_name {
gpu.func {}
...
gpu.module_end
}
Implementations§
source§impl<'c> GPUModuleOperation<'c>
impl<'c> GPUModuleOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> GPUModuleOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GPUModuleOperationBuilder<'c, Unset>
Creates a builder.