Skip to main content

remblais

remblais logo

remblais computes geometric losses between measures on NVIDIA (CUDA), AMD (ROCm/HIP) and Intel (SYCL) GPUs: Sinkhorn divergences (entropic optimal transport), kernel norms (MMD) and Hausdorff divergences between point clouds, images and volumes. It is a drop-in replacement for GeomLoss 0.3.1, built on kernox instead of PyKeOps: write import remblais as geomloss and your code runs unchanged.

Why remblais

  • Same API as GeomLoss. SamplesLoss, sinkhorn_divergence, ImagesBarycenter and the ot module have the GeomLoss 0.3.1 signatures, calling conventions and output shapes. With backend="tensorized", values and gradients match GeomLoss bit for bit, apart from the documented fixes.
  • Faster. Every softmin is one fused kernox reduction, compiled once and reused for all values of ε; the debiased Sinkhorn loop fuses its four softmins into two reductions per iteration.
  • NVIDIA, AMD and Intel GPUs. The online and multiscale backends, which GeomLoss runs through PyKeOps on NVIDIA GPUs only, run here on CUDA, ROCm/HIP and SYCL through kernox. remblais's own test suite runs on NVIDIA and Intel GPUs; on AMD GPUs it relies on kernox's tested HIP backend.
  • Fixes, not surprises. A few GeomLoss bugs are fixed (the gradient of unbalanced transport, "hausdorff" without a kernel, ...). Every difference is listed in Coming from GeomLoss.

Installation

remblais needs Python 3.10 or later, PyTorch and kernox. Install PyTorch for your platform, then kernox with the extra that matches your GPU, then remblais, both from PyPI. For an NVIDIA GPU:

pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install "kernox[cuda]"
pip install remblais

For AMD and Intel GPUs, install PyTorch from the rocm or xpu index and kernox with the rocm or xpu extra; the details are in the kernox installation guide and in Getting started.

Performance

The goal of remblais is to be at least as fast as GeomLoss wherever GeomLoss runs. In the cases measured so far, it is already faster.

Sinkhorn divergence, p = 2, FP32, forward and backward passes, on an RTX 2080 Ti; remblais with fast_math, its default setting, against GeomLoss 0.3.1 in its best configuration (each PyKeOps kernel compiled alone in a fresh process). Time ratios remblais / GeomLoss, lower than 1 when remblais is faster:

Case N = 10⁴ N = 10⁵ N = 10⁶
multiscale, D = 2 ×0.45 ×0.40 ×0.79
multiscale, D = 3 ×0.26 ×0.92 ×0.96
online, D = 2 ×0.33 ×0.84 ×0.89
online, D = 3 ×0.31 ×0.85 ×0.90
online, D = 64 ×0.45 ×0.54 not measured

For small clouds (N = 10³ to 3·10⁴), the online backend runs at ×0.31 to ×0.61 of the GeomLoss time in D = 2 and 3, and at ×0.17 to ×0.45 in D = 64.

These figures cover only the cases listed; they are not a general claim of superiority over GeomLoss on every workload or card. The full tables and the protocol are on the Performance page.

In 1781, Gaspard Monge asked how to move a pile of earth, the déblais, into a hole of the same volume, the remblais, at the lowest cost: the founding problem of optimal transport. remblais is where the mass ends up. The logo shows the ox of symox and kernox, harnessed this time to a scraper, carrying the déblais to the remblais: Monge's optimal transport.

License

At your option, MIT or Apache-2.0. Code derived from GeomLoss stays under the MIT license of GeomLoss; its provenance and notice are in THIRD_PARTY.md.

Metadata

Release files for remblais 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for remblais 1.0.1
File Size Uploaded Provenance Actions
remblais-1.0.1.tar.gz 86.8 kB With provenance Details for remblais-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for remblais 1.0.1
File Interpreter ABI Platform Actions
remblais-1.0.1-py3-none-any.whl Python 3 none any Details for remblais-1.0.1-py3-none-any.whl

Total release size: 183.0 kB

Release files / remblais-1.0.1.tar.gz

Download URL remblais-1.0.1.tar.gz
Size 86.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a8fbe33e2602ca738109028df0cf615176c9ea5abf49814898eb2b37bc485789
BLAKE2b-256 checksum
How to use checksums
3abd6fbbaf174a29abc5b8041121dc0b14bf317dd5c420a9ee1da9096b5075ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / remblais-1.0.1-py3-none-any.whl

Download URL remblais-1.0.1-py3-none-any.whl
Size 96.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6449077c617b44ce5d1f75ce55e56c083d756446d0135d8af4a2efd982974124
BLAKE2b-256 checksum
How to use checksums
10f6be00fa330c5b401b7df8f9a8d173972bff01d83efe4f4bc932dbfd3262a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for remblais 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for remblais-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page