Skip to main content

Fast, differentiable sorting in pure PyTorch without C++ or CUDA

Project description

Fast, differentiable sorting and ranking in pure PyTorch without C++ or CUDA. This is a lightweight implementation of Fast Differentiable Sorting and Ranking (Blondel et al.) and inspired by torchsort. Unlike the torchsort, this version contains no C++ or CUDA extensions, making it easy to install, portable, and compatible with any environment where PyTorch runs. While the original C++/CUDA implementation may have a performance edge for extremely large batch sizes, this pure PyTorch version is optimized to be efficient for standard deep learning workflows. Try it here: Open In Colab

Installation

pip install torchpsort

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchpsort-0.0.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torchpsort-0.0.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file torchpsort-0.0.2.tar.gz.

File metadata

  • Download URL: torchpsort-0.0.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for torchpsort-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ca0388206f46da0e41cd879810a006620d5699e8a89244c6416ee06f4584d2e2
MD5 61f7e619c35cad04aa6b6bc0916d17b9
BLAKE2b-256 6ac5efcfbf02cc9a8da34cc38a10a32c154c94087ff713418ba9e72551a91865

See more details on using hashes here.

File details

Details for the file torchpsort-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: torchpsort-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for torchpsort-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 785961e5cdf84908854e36824cda08960d00fd788bfd75185018b75aa0bca104
MD5 64fe5b1cf753775e9740d78160e37109
BLAKE2b-256 de2934167b317e533d7da8e93e43bbd4c9516332cf417c0c06baca71dd4181df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page