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.1.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.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchpsort-0.1.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","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.1.2.tar.gz
Algorithm Hash digest
SHA256 21c5e9b6976d27f01d4031fcba34a242ecc9cb034dd990b560d4b84769604e0e
MD5 bce650bbbdc3713910dd60a334c9eba4
BLAKE2b-256 f5ba8ae183bb10dd5a9fa5f17d6b61027372aa27ae412748c01ccf1e041d37b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchpsort-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a461d7d2f6a64a18cd242a42eb210fce5c95c86ec114fe6dff3b2c6353c0cc93
MD5 dbbd8cecd04286eada50af81ac9af227
BLAKE2b-256 b7d1a0d40496ec4412aea3e34bab0ca60277d4428104121e48b0904b04c05225

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