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.3.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.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchpsort-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 834e1e8f28b9ccd7b9207375996d4287e23cc72d76f542d31240186bb08e3d56
MD5 2482f8902dbb0a0d320805a88ca3511d
BLAKE2b-256 fbd2a223b195828557ef1685b608b058b642caca6b5d52ff00d9434bc3c69e5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchpsort-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b2778ee50f8de1ebe463a8663676cbb111cd92db649e614c2c9995a7cf3b4f24
MD5 b8332fa50eca2f0e68ab2678ee72d939
BLAKE2b-256 d51c06b8eeb1efd424744a159cfa67206c273881e6e3ef40725cb271026ae010

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