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.1.tar.gz (19.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.1-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vcsparse-0.1.1.tar.gz
  • Upload date:
  • Size: 19.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.1.tar.gz
Algorithm Hash digest
SHA256 753a477254c03bb0e7116c1dfbe65af55cfb1d084825d6c0717f27b61a2d11a8
MD5 0665549c52a7ad950c7c96a2587e6406
BLAKE2b-256 12a30697c58834e2179571ff9c20f8c7f1ddc021d8d934b5f7783e7565ce1d79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vcsparse-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 47.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38906f080aa0e4ce599428dfae88988f893c5b2e115f79043448234097879670
MD5 33100e8e0f58a8ba2fbe79777b76b894
BLAKE2b-256 27731b712a1647696a55e7133de6746ca1cb2e3ae4eea8284ca5b302008871f0

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