Repository navigation
Releases
Releases · adityaanilraut/torch-iris
torch-iris 0.17.0
torch-iris 0.17.0 adds native INT8 matrix multiplication and expands matrix-product support on Intel Iris Xe.
Changes
torch._int_mmand itsout=overload multiply signed INT8 matrices on Iris and return INT32 results. Compatible layouts use packed DP4a when the driver exposes it. Other supported layouts use a strided OpenCL kernel.- Added GPU execution for
mm.out,bmm.out,addmm.out,dot.out,addbmm_, and_addmm_activation.out. The new registrations also enable dependent paths such asmatmul(..., out=...),addmm_, andlinear.out. mm,bmm,addmm, andbaddbmmacceptout_dtype=torch.float32with FP16 and BF16 inputs.addmmalso supports BF16, integer, and complex64 operands.
Verification
- The Windows x64 wheel passed 211 tests and 120 subtests on Intel Iris Xe with Python 3.12 and PyTorch 2.12.1.
- INT8 verification ran with CPU fallback disabled and matched the CPU reference exactly.
- The wheel passed
twine check --strictand includes the project and bundled OpenCL licenses.
Install from GitHub
Use 64-bit Windows and Python 3.12. Install the PyTorch CPU build and the attached wheel in the same environment.
python -m pip install torch==2.12.1 --index-url https://download.pytorch.org/whl/cpu
python -m pip install --no-deps --upgrade .\torch_iris-0.17.0-cp312-cp312-win_amd64.whlWheel SHA-256 2dd53f1c063a3c3a737e1cae28148b3b8bc79be0407921e2e8aaac572a846e98.
torch-iris 0.16.1
torch-iris 0.16.1
Reliability, observability, and fail-safe hardening release for PyTorch 2.12.1 on Intel Iris Xe GPUs (64-bit Windows).
Highlights
- Observable Boxed
PrivateUse1CPU Fallback:- Registers a boxed CPU fallback (
csrc/fallback.cpp) for unimplemented ATen operators while guaranteeing all native OpenCL kernels and PyTorchCompositeExplicitAutograddecompositions take precedence with zero overhead. - Supports in-place ops,
out=ops (via nativeaten::_copy_from_and_resize), multi-tensor outputs, non-contiguous/strided views, and autograd forward/backward paths. - Emits a once-per-operator
UserWarningand exposestorch_iris.fallback_stats(),torch_iris.reset_fallback_stats(),torch_iris.set_cpu_fallback_enabled(bool)/is_cpu_fallback_enabled(),torch_iris.set_fallback_warning_enabled(bool)/is_fallback_warning_enabled(), plusTORCH_IRIS_CPU_FALLBACKandTORCH_IRIS_FALLBACK_WARNenvironment toggles. - Preserves explicit FP64 (
float64/complex128) rejection on Intel Iris Xe without silent downcasting.
- Registers a boxed CPU fallback (
- Everyday PyTorch Ergonomics & Empty-Tensor Hardening:
- Verified native OpenCL execution (0 CPU fallbacks) for boolean/integer reductions (e.g.
(outputs.argmax(dim=1) == labels).sum()) and standard optimizers (SGD,Adam,AdamWacross defaultforeach=None,foreach=True,foreach=False, andfused=True). - Fixed empty-batch
BatchNorm(_batch_norm_impl_index) and added 0-element guards acrossLayerNorm,Conv2d/ConvTranspose2dbackward, andmse_loss_backward.
- Verified native OpenCL execution (0 CPU fallbacks) for boolean/integer reductions (e.g.
- Defensive OpenCL Error & OOM Handling:
- Human-readable OpenCL error names and actionable diagnostics for device discovery, kernel build/enqueue failures, and allocations exceeding
max_mem_alloc_size(raisestorch.OutOfMemoryError). - Graceful OOM recovery that flushes/finishes queues and reclaims pooled device buffers before retrying allocation (tracked via
cache_reclaimsintorch_iris.memory_stats()).
- Human-readable OpenCL error names and actionable diagnostics for device discovery, kernel build/enqueue failures, and allocations exceeding
Verification Summary (Intel(R) Iris(R) Xe Graphics, Windows x64, Python 3.12, PyTorch 2.12.1)
- Full pytest suite (
tests/):200 passed, 120 subtests passed - Parity
forward:14/14 native_pass(0 CPU fallbacks) - Parity
training:12/12 native_pass(0 CPU fallbacks) - Parity
operators:27/27 native_pass(0 CPU fallbacks) - Packaging:
twine check --strictPASSED (bundlesLICENSE,NOTICE,third_party/opencl/LICENSE)
Wheel Checksum
torch_iris-0.16.1-cp312-cp312-win_amd64.whl- SHA-256:
235295991d951e07a7d1214ebc8f3b4ad31cb4933071993c43caae11109a7079
torch-iris 0.16.0
torch-iris 0.16.0
OpenCL PyTorch backend extension for Intel Iris Xe GPUs on 64-bit Windows.
Requirements
- 64-bit Windows (Windows 10 / 11) with Intel Iris Xe OpenCL graphics driver
- Python 3.12 (>=3.12, <3.13)
- PyTorch 2.12.1 (CPU build)
Installation
py -3.12 -m venv .venv-iris
.\.venv-iris\Scripts\python.exe -m pip install torch==2.12.1 --index-url https://download.pytorch.org/whl/cpu
.\.venv-iris\Scripts\python.exe -m pip install --no-deps .\torch_iris-0.16.0-cp312-cp312-win_amd64.whlVerification
- Verified on Intel(R) Iris(R) Xe Graphics (Python 3.12, PyTorch 2.12.1+cpu): 179 passed, 120 subtests passed
- Wheel SHA-256:
5fd58e16635b5d931cdd82b79ec7a73fbc407447b280b7bedd1305c888bb76a4
License
Licensed under the Apache License, Version 2.0 (see LICENSE and NOTICE).