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.0.tar.gz (5.0 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.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchpsort-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 753ea61423afc1ee8601e35ca0d78aab3e42edf02ad5b382f982ba51fa33928f
MD5 e44be133aef6be2abef058d2321fae18
BLAKE2b-256 8046e372a3d1a92967f940556d64a8a10509c16f79abf74036817676dc8edb28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchpsort-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02d1042393d2f322d5e1b760e3773ad74344175b403ef103b9e69c30866ebeaa
MD5 0f4cf12da40c81ab520843cffff214ea
BLAKE2b-256 b760ff9878735c58a53b1d3d19074b4d1bc3ee086c05440f3d0ae7801a69fd43

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