Skip to main content

Generate fused and vectorizable kernels for sparse tensor programs on CPUs and GPUs

Project description

VCSparse: Generate fused and vectorizable kernels for sparse tensor programs on CPUs and GPUs. An web tool is available to try VCSparse online: https://tongzhou80.github.io/vcsparse-web/index.html.

More technical detals are to be added!

Installation

pip install vcsparse

Quick introduction

To compile a function with vcsparse, all you need to do is to add index notation to the function arguments, and decorate the function with @vcsparse.compile. Here's an example:

@vcsparse.compile(full_opt=True)
def mul_then_rowwise_sum(A: Tensor('i,j', 'csr'), B: Tensor('i,j', 'csr')):
    return (A * B).sum(1)

The option full_opt=True will enable all optimization passes. The directory tests/ contains many code examples of using VCSparse, feel free to check them out.

Note

Currently only a CPU backend (via Numba) is implemented. A GPU backend (via APPy) is under development.

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

vcsparse-0.1.2.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

vcsparse-0.1.2-py3-none-any.whl (49.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vcsparse-0.1.2.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vcsparse-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3eedffaa946648b4d0e5c413cd2acfc1ca360cf76b88ce19a79e0afd9eaf13bc
MD5 a8c4e6902c4b074d24d9f54d76a60543
BLAKE2b-256 ab077f3fc8297df5e2a59888a3c3af34cfb651bb35b269391debe1cb3db9e4a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vcsparse-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 49.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for vcsparse-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a46cfb87c3c3d9e0dcf1925836f8c45378b59e0c0ac8e09b3f319f6241cba7b
MD5 6fa694538b6d2979cbcb6e90e6517b2e
BLAKE2b-256 fa353f28030830786db6a11117d5cea2f642245b4908ccbd33e8b6a7403ac734

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