Skip to main content

Module prelude

Module prelude 

Source

Re-exports§

pub use crate::dsl::RuntimeArg;
pub use crate::dsl::codegen::KernelExpansion;
pub use crate::dsl::codegen::KernelIntegrator;
pub use crate::dsl::codegen::KernelSettings;
pub use crate::dsl::compute::KernelBuilder;
pub use crate::dsl::compute::KernelLauncher;
pub use crate::dsl::compute::PreparedKernel;
pub use crate::dsl::define;
pub use crate::dsl::define_scalar;
pub use crate::dsl::define_size;
pub use crate::dsl::size;
pub use crate::dsl::frontend::*;

Macros§

comment
Insert a literal comment into the kernel source code.
comptime
Mark the contents of this macro as compile time values, turning off all expansion for this code and using it verbatim
comptime_type
Makes the function return a compile time value Useful in a ruda trait to have a part of the trait return comptime values
intrinsic
Mark the contents of this macro as an intrinsic, turning off all expansion for this code and calling it with the scope
terminate
Terminate the execution of the kernel for the current unit.

Structs§

CompiledKernel
A kernel, compiled in the target language
ComputeClient
The ComputeClient is the entry point to require tasks from the ComputeServer. It should be obtained for a specific device via the Compute struct.
DebugInformation
Extra debugging information about the compiled kernel.
KernelArg
Global argument of a kernel.
KernelDefinition
KernelId
Kernel unique identifier.
KernelOptions
Options for a specific kernel compilation
KernelTask
Wraps a RudaKernel to allow it be compiled.
RudaDim
The number of units across all 3 axis totalling to the number of working units in a ruda.
RudaTaskKernel
Generic RudaTask for compiling kernels
ScalarKernelArg
Scope
The scope is the main crate::ir::Operation and crate::ir::Variable container that simplify the process of reading inputs, creating local variables and adding new operations.
flex32
A floating point type with relaxed precision, minimum f16, max f32.
tf32
A 19-bit floating point type implementing the tfloat32 format.

Enums§

AddressType
The type used for addressing storage types in a kernel. This is the type usize maps to when used in a kernel, with isize being mapped to the signed equivalent.
ExecutionMode
The kind of execution to be performed.
FastMath
Unchecked optimizations for float operations. May cause precision differences, or undefined behaviour if the relevant conditions are not followed.
LaunchError
Kernel Launch Errors.
RudaCount
Specifieds the number of rudas to be dispatched for a kernel.
StorageType
Physical type containing one or more elements
Type
Visibility

Traits§

KernelMetadata
Implement this trait to create a kernel definition.
RudaElement
The base element trait for the jit backend.
RudaKernel
Kernel that can be defined
Runtime
Runtime for the Ruda.

Functions§

clamp
A value bounded by a minimum and a maximum
clamp_max
A value bounded by a maximum value
clamp_min
A value bounded by a minimum value
type_name_short_sanitized
Provide a short, sanitized type name for use in function or file names

Type Aliases§

VectorSize

Attribute Macros§

derive_expand
Attribute macro to derive ruda traits for existing structs, without redefining that struct.
derive_ruda_comptime
Attribute macro to define a type that can be used as a kernel comptime argument This derive Debug, Hash, PartialEq, Eq, Clone, Copy
ruda
Mark a ruda function, trait or implementation for expansion.

Derive Macros§

AutotuneKey
Implements display and initialization for autotune keys.
IntoRuntime
Implements IntoRuntime for a RudaType
RudaLaunch
Derive macro to define a ruda type that is launched with a kernel
RudaType
Derive macro to define a ruda type that is not launched
RudaTypeMut
Implements mutability for a RudaType