Skip to main content

CUda Matrix Multiply library

Project description

cumm

CUda Matrix Multiply library.

Build Status

cumm is developed during learning of CUTLASS, which use too much c++ template and make code unmaintainable. So I develop pccm, use python as meta programming language, to replace c++ template meta programming. Now pccm become a foundational framework of cumm and my other c++ project such as spconv. cumm also contains a python asyncio-based gemm simulator that share same meta program with CUDA code, enable gemm visualization and easy debug experience.

BREAKING CHANGES

  • 0.3.1: tv::DType enum value changed, this will affect all binary code of tv::Tensor user. you must recompile all code if upgrade to cumm >= 0.3.1.

News

Install

Prebuilt

We offer python 3.9-3.13 and cuda 11.4/11.8/12.1/12.4/12.6 prebuilt binaries for linux (manylinux_2_28).

We offer python 3.9-3.13 and cuda 11.4/11.8/12.1/12.4/12.6 prebuilt binaries for windows 10/11.

We offer python 3.9-3.13 prebuilt binaries for Mac OS X >= 14.0 (Apple Silicon Only).

pip install cumm for CPU-only

pip install cumm-cu114 for CUDA 11.4

pip install cumm-cu126 for CUDA 12.6

Build from source for development (JIT, recommend for develop)

WARNING Use code in tags!!! code in main branch may contain bugs.

The c++ code will be built automatically when you change c++ code in project.

Linux

  1. uninstall cumm installed by pip. you must ensure no "cumm" exists in pip list | grep cumm
  2. install build-essential, install CUDA
  3. git clone https://github.com/FindDefinition/cumm, cd ./cumm, git checkout tags/<tag_name>, pip install -e .
  4. in python, import cumm and wait for build finish.

Windows

  1. uninstall spconv and cumm installed by pip. you must ensure no "cumm" exists in pip list | grep cumm
  2. install visual studio 2019 or newer. make sure C++ development component is installed. install CUDA
  3. set powershell script execution policy
  4. start a new powershell, run tools/msvc_setup.ps1
  5. git clone https://github.com/FindDefinition/cumm, cd ./cumm, git checkout tags/<tag_name>, pip install -e .
  6. in python, import cumm and wait for build finish.

Build wheel from source

WARNING Use code in tags!!! code in main branch may contain bugs.

WARNING: If CUMM_CUDA_VERSION is set with a CUDA version, following steps will create a wheel named "cumm-cuxxx", not "cumm", this means you must use cumm-cuxxx in dependency of your project which depend on cumm, not cumm. If CUMM_CUDA_VERSION isn't set, cumm will always built with CUDA, so the CUDA must exists in your system. The wheel name will be cumm even if it is built with cuda.

Linux

It's recommend to build Linux packages in official build docker. Build with CUDA support don't need a real GPU.

Build in Official Docker
  1. select a cuda version. available: CUDA 11.1, 11.3, 11.4, 11.5, 12.0
  2. (Example for CUDA 11.4) git clone https://github.com/FindDefinition/cumm, cd ./cumm, docker run --rm -e PLAT=manylinux2014_x86_64 -e CUMM_CUDA_VERSION=114 -v `pwd`:/io scrin/manylinux2014-cuda:cu114-devel-1.0.0 bash -c "source /etc/bashrc && /io/tools/build-wheels.sh"
Build in your environment
  1. install build-essential, install CUDA
  2. set env for installed cuda version. for example, export CUMM_CUDA_VERSION="11.4". If you want to build CPU-only, run export CUMM_CUDA_VERSION="". If CUMM_CUDA_VERSION isn't set, you need to ensure cuda libraries are inside OS search path, and the built wheel name will be cumm, otherwise cumm-cuxxx
  3. run export CUMM_DISABLE_JIT="1"
  4. run python setup.py bdist_wheel+pip install dists/xxx.whl

Windows 10/11

  1. install visual studio 2019 or newer. make sure C++ development package is installed. install CUDA
  2. set powershell script execution policy
  3. start a new powershell, run tools/msvc_setup.ps1
  4. set env for installed cuda version. for example, $Env:CUMM_CUDA_VERSION = "11.4". If you want to build CPU-only, run $Env:CUMM_CUDA_VERSION = "". . If CUMM_CUDA_VERSION isn't set, you need to ensure cuda libraries are inside OS search path, and the built wheel name will be cumm, otherwise cumm-cuxxx
  5. run $Env:CUMM_DISABLE_JIT = "1"
  6. run python setup.py bdist_wheel+pip install dists/xxx.whl

Contributers

Note

The work is done when the author is an employee at Tusimple.

LICENSE

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

cumm_cu124-0.8.0-cp313-cp313-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.13Windows x86-64

cumm_cu124-0.8.0-cp313-cp313-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

cumm_cu124-0.8.0-cp312-cp312-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.12Windows x86-64

cumm_cu124-0.8.0-cp312-cp312-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

cumm_cu124-0.8.0-cp311-cp311-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.11Windows x86-64

cumm_cu124-0.8.0-cp311-cp311-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

cumm_cu124-0.8.0-cp310-cp310-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu124-0.8.0-cp310-cp310-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

cumm_cu124-0.8.0-cp39-cp39-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu124-0.8.0-cp39-cp39-manylinux_2_28_x86_64.whl (28.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

Details for the file cumm_cu124-0.8.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cumm_cu124-0.8.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cumm_cu124-0.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 855cec6c0b6b2256a617dccbc0886c70658dbdf5338246faaf8e365f8a83cbb1
MD5 8c85b860ec72cf89e2c6629d9c6a899b
BLAKE2b-256 bf4cf32256e28c3dffc9fb859bc31f0f0a8f009738884c0ddf5980967d4964bd

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu124-0.8.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26f79177e9092fb27ca9e27079850b03da005bfc1a8ee34ddc8ddd6af03f29c0
MD5 05d97e750ed028a1bb2101211b50a74d
BLAKE2b-256 e7082353856ee4d2b8cc467617c08f02cd5da47e292335158d5dfe00f64d28a1

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cumm_cu124-0.8.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cumm_cu124-0.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 576c8052799ee9408114c5e102cf6a7e343772bdba528b0daed6a790de8629b8
MD5 d3c042d520fec6d08516f98923301932
BLAKE2b-256 4c06037f5171f12c26e777012a1223036cbf2bed8d3f78e08836c9279ca3113d

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu124-0.8.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24777444d06d8834221a77fdbd98c78a972c12566249badab27a6edc7e3d7227
MD5 bce49c9a1ad1015af159bc4b9ad8470d
BLAKE2b-256 3b83463c1eafb3cf2c6d65e07930fcb8ac3a2bbe71575d49af0cc6911566a567

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cumm_cu124-0.8.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for cumm_cu124-0.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 db5f17ba122a00f4431444b8b4f15edc5cb259f07752c6cd6906c668b2763377
MD5 d41e08548c1c5ab6f1e4de797b806907
BLAKE2b-256 7f72a8e2908bcfcdf5da765c0103d0f27ccf0d90cc7bed51cfc11cdad91eaedd

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu124-0.8.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38237f1118b2d17eccefd2d0ec66c9b6c05d0239e1765e94b1123be900f7124e
MD5 128930c4ef3afc6a4dc225ea67b49b59
BLAKE2b-256 0e9cd562ff2b91dfbac330667a3a857d138bdf0da65941aa7243d26bf4257652

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cumm_cu124-0.8.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for cumm_cu124-0.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cbb008d57e33abdda1bdb318560fe6ce60ab0be8000e49f98b787669ed362861
MD5 a8dfbbbae53fa3525028ba784eba7618
BLAKE2b-256 65cf43bbcc0d765de27a372c47c214babcf2c4b5deb8ce13d42796d718784f24

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu124-0.8.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e26e6cacd60f7997e985c63ca43e251155d4c812d0b31a20be308763ab68ab19
MD5 6e68b4d42c151a67649ad91d794c0df2
BLAKE2b-256 ffd5a183ac2efaa9ceae5011969be08ddf63baef20c13f66083b3fd3ee8dc285

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cumm_cu124-0.8.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for cumm_cu124-0.8.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c29ddefd3cb1ebb8fefe6d01c5d0770a536214484835c4d53e51878280004849
MD5 5372f7b28e38bf87d3b91dd6fc0f0feb
BLAKE2b-256 fcad20e9f18b8b41cc0485535dc4a358b233ce6140c3c3f7ab6aa93dc400258b

See more details on using hashes here.

File details

Details for the file cumm_cu124-0.8.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu124-0.8.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 defc0d28157a433afadca0865210217a162a6c8a3a255c2c557811d1348585f5
MD5 ed2c11677a253bf05d63ef13689d1e43
BLAKE2b-256 35707f996de2634f4e7fbeadc5967ea737af932efeca1dac91d509ddb1cf8f1e

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