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

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchpsort-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 24bad762770f3d3aaf8aaebdfc713344883b6ffd6f960bb993ba46736f03ad3b
MD5 531ab36aa6d3cbe468786131d10195eb
BLAKE2b-256 2e10b34855d87fa2151f0a8871b21ee7b71b10df1f3bfcb0c7497fd922671830

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchpsort-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9efd76661f24c265ac34b45f24aab48b7459b83d67de3c21c64568bcfd22753
MD5 958760272d9bb76e2d452c211330dd47
BLAKE2b-256 b0149594142104405adccc6b4a79b9bcfbe226480ffab116058ba79d49872d91

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