tilus.Script¶
- class tilus.Script[source]¶
The
Script
class represents a tilus script, which defines a GPU kernel through a sequence of block-level instructions. See Tilus Script for an overview of the tilus script language.
Attributes and Variables¶
Language Constructs¶
Instructions¶
|
Compute the absolute value of a register tensor. |
|
Add two register tensors element-wise. |
|
Annotate the layout of a register tensor. |
|
Assign the value of src tensor to dst tensor. |
|
Cast a register tensor to a different data type. |
|
Copy from global to shared tensor asynchronously. |
Commit async copies into a group. |
|
Wait for all copy_async instructions to complete. |
|
Wait the completion of asynchronous copy groups. |
|
|
Dot product. |
|
Compute the exponential of each element. |
|
Compute the base-2 exponential of each element. |
|
Free a shared tensor. |
|
Allocate a global tensor. |
|
Create a global tensor view. |
|
Load a slice of global tensor into a register tensor. |
|
Load a shared tensor into a register tensor. |
|
Lock semaphore with a specified value. |
|
Compute the maximum value along a dimension. |
|
Compute the element-wise maximum. |
|
Compute the minimum value along a dimension. |
|
Print a tensor with a message. |
|
Print a formatted string. |
|
Create a register tensor. |
|
Release semaphore with a specified value. |
|
Repeat elements of a register tensor along its dimensions. |
|
Repeat elements of a register tensor along its dimensions. |
|
Round each element to the nearest integer. |
|
Allocate a shared tensor. |
|
Squeeze a dimension of a register tensor with size 1. |
|
Store a register tensor into a slice of a global tensor. |
|
Store a register tensor into a shared tensor. |
|
Sum the elements along a specified dimension. |
|
Perform a synchronization. |
|
Transpose a 2-D register tensor. |
|
Unsqueeze a dimension of a register tensor. |
|
View register tensor with a different layout or data type. |
|
Select elements from two tensors based on a condition. |