# Torch-vulkan 0.2.0: a PrivateUse1 backend that runs PyTorch's tested ops as Vulkan kernels

**URL:** <https://dev-discuss.pytorch.org/t/torch-vulkan-0-2-0-a-privateuse1-backend-that-runs-pytorchs-tested-ops-as-vulkan-kernels/3528>\
**Category:** hardware-backends\
**Created:** [November 12, 2026, 6:23am UTC](https://dev-discuss.pytorch.org/t/torch-vulkan-0-2-0-a-privateuse1-backend-that-runs-pytorchs-tested-ops-as-vulkan-kernels/3528 "2026-11-12T06:23:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asemptote](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@asemptote](https://dev-discuss.pytorch.org/u/asemptote)\
**Post date:** [November 12, 2026, 6:23am UTC](https://dev-discuss.pytorch.org/t/torch-vulkan-0-2-0-a-privateuse1-backend-that-runs-pytorchs-tested-ops-as-vulkan-kernels/3528/1 "2026-11-12T06:23:44Z")

</div>

I’ve released [torch-vulkan](https://github.com/asemptote/torch-vulkan) 0.2.0, an out-of-tree backend (device `"vk"`) that runs PyTorch ops as Vulkan compute kernels, aimed at scientific code: float64, complex numbers, FFTs, dense and sparse linear algebra. Every op exercised by 36 of PyTorch’s own test files (about 160,000 tests) and by the OpInfo database (689 ops) runs on the GPU with no CPU fallbacks and matches the CPU’s results, on Intel, NVIDIA, Arm Mali and Mesa.

A few things from building it that may be useful to other PrivateUse1 backends:

- Running PyTorch’s device-generic test files against an out-of-tree device, with a strict mode (`TORCH_VK_STRICT=1`) that turns any CPU fallback into an error, and a counter (`fallback_counts()`) for the rest.
- A table of the CPU’s dtype errors, generated from OpInfo, so the device rejects exactly what the CPU rejects and PyTorch’s dtype tests agree.
- Comparing against the CPU found a segfault in `_weight_int8pack_mm` for bfloat16 ([#204474](https://github.com/pytorch/pytorch/issues/204474)).

Wheels for Windows and Linux (PyTorch 2.14): [releases](https://github.com/asemptote/torch-vulkan/releases). More context in [#160230](https://github.com/pytorch/pytorch/issues/160230#issuecomment-6816198041). Reports from GPUs I haven’t tried, AMD especially, are welcome in [Discussions](https://github.com/asemptote/torch-vulkan/discussions). I directed the development, with Claude Opus 5.5 writing the code.
