Environment Variables
torch_ha reads two user-facing environment variables directly, listed below. For variables shared across the SDK, such as those
for logging and backend selection, see the documentation for the lower layers.
Memory
| Variable |
Type |
Default |
When applied |
Description |
HA_FILL_KERNEL |
Integer |
On |
First fill |
When 0, fill_ and zero_ do not use the device memset kernel and fill everything on the host path |
HA_FILL_KERNEL_MIN_BYTES |
Bytes |
1048576 (1 MiB) |
First fill |
Fills smaller than this use the host path. When 0, every fill the kernel can handle goes to the kernel. A negative or non-numeric value falls back to the default |
Variables of Lower Layers
What Is Not Controlled by Environment Variables
| Setting |
How to set it |
| Device selection |
Set through the API with torch.accelerator.set_device_index. Distributed §4.2 |
| Weight layout |
Applied automatically when an nn.Linear or nn.Embedding module is moved to lpu |
Eager compute kernels (add, sub, mul, mm) |
Always enabled. No environment variable disables or changes them. Operators §3.1 |
See Also