Skip to main content

torch.cdist like function to compute the pairwise euclidean distances between vectors in pytorch_sparse SparseTensors A and B

Project description

pytorch_sparse_addons

Does not support autograd atm

Requires

  • python==3.11
  • torch==2.3.0
  • torch_scatter
  • torch_sparse

Usage

from pytorch_sparse_addons.dist import cdist
x = SparseTensor.from_dense(torch.tensor([[1.0,2.0,3.0],[1.0,.0,.0],[.0,1.0,1.0]]))
y = SparseTensor.from_dense(torch.tensor([[1.0,2.0,3.0],[1.0,.0,.0],[.0,1.0,.0],[.0,1.0,2.0],[.0,1.0,2.0]]))
result = cdist(x,y)

Building

Build for compute capability 6.1, 7.0, ,7.5, 8.0, 8.6, 8.9 to support your cards compute capability e.g. build with TORCH_CUDA_ARCH_LIST="<compute_capability;other_compute_capability>" pdm build

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

pytorch_sparse_addons-0.1.5.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

pytorch_sparse_addons-0.1.5-cp311-cp311-manylinux_2_35_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

File details

Details for the file pytorch_sparse_addons-0.1.5.tar.gz.

File metadata

  • Download URL: pytorch_sparse_addons-0.1.5.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.18.1 CPython/3.10.12 Linux/6.8.0-40-generic

File hashes

Hashes for pytorch_sparse_addons-0.1.5.tar.gz
Algorithm Hash digest
SHA256 cbf91aad86c3af6b823bf84c520f5a0615a33e3d22bad7a0d3a2c889e0790609
MD5 9411e1b161c2d0bde2510c1e48d3b128
BLAKE2b-256 b67d7e0725b8dce9647f8c9a7d1debb768f3dc7e3d712542f27966613aec3adb

See more details on using hashes here.

File details

Details for the file pytorch_sparse_addons-0.1.5-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pytorch_sparse_addons-0.1.5-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 680c1d685a64803632dbdb86fe2430d785650842b1b6d09feb981cb6dd113c78
MD5 bb6f5fa7282a8e522f662c2f3f90e5d8
BLAKE2b-256 5fb5e69a3bde87e6574445faee9c1c26ed4dca3777fe0bd470e0d85085bee9b8

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