Skip to main content

Module ptx

Module ptx 

Source

Modules§

barrier_native_handle
copy_async
generic_to_shared
ptx_mma_ty
ptx_scale_ty
tensor_map_address
tma_load_im2col

Macros§

ptx_block

Structs§

BarrierNativeHandleOp
Returns the shared address directly because it’s always combined with generic_to_shared in practice, and it makes the types easier to deal with.
GenericToSharedOp
Equivalent of __cvta_generic_to_shared, required when a PTX instruction uses a specific .shared modifier. It should only be used to cast a pointer for use in that specific context, and using it without adding the .shared modifier will break. Using shared addresses in generic instructions will also break, which is why this isn’t automatically applied in InlinePtxOp.
InlinePtxOp
Inline PTX. Restricted to zero or one results because C++ semantics are too hard otherwise. Note that this does not directly map to PTX, because it actually destructures vectors to PTX vector expressions automatically. This means more than one register can be returned if it’s part of a vector expression. To denote the difference, the syntax uses $0, $1 etc for Pliron values, as opposed to the usual %0, %1 etc for the PTX registers.
TensorMapAddrOp
Tensor maps are weird because they’re passed as a reference but consumed by pointer. Don’t want to add a generic ReferenceOp, so for now just do a tensor-map specific reference. That way it doesn’t need to deal with Metal address space nonsense. Returns the raw address as u64 since it’s always used for PTX anyways, and that coerces pointers to u64.

Functions§

barrier_native_handle
generic_to_shared
mma_ty
ptx_mma_ty
ptx_scale_ty
tensor_map_address