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 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytorch_sparse_addons-0.1.4.tar.gz.
File metadata
- Download URL: pytorch_sparse_addons-0.1.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbebe1a3142aa55be8b2efc85c88a5af5d908da5de1021a801706058720aaddd
|
|
| MD5 |
d119644d71e77f4bbd854bcca0da8a69
|
|
| BLAKE2b-256 |
12246a51206a6d42b85232c4fff50ea57d4183fb620cc4ff7c8257aff320dba6
|
File details
Details for the file pytorch_sparse_addons-0.1.4-cp311-cp311-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: pytorch_sparse_addons-0.1.4-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.18.1 CPython/3.10.12 Linux/6.8.0-40-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c11ecb8ac90e9814656ad7fa99d47b797315adb968d1faa1c2251faf5c41ded
|
|
| MD5 |
00cd6b5d26b366ee294ae49052766e7c
|
|
| BLAKE2b-256 |
486083b271b0c374520127e762104ea40a784c5d3435b17f29cb85675361a979
|