Skip to main content

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.

Install

Prebuilt

We offer python 3.6-3.10 and cuda 10.2/11.1/11.3/11.4 prebuilt binaries for linux (manylinux).

We offer python 3.7-3.10 and cuda 10.2/11.1/11.3/11.4 prebuilt binaries for windows 10/11.

We will offer prebuilts for CUDA versions supported by latest pytorch release. For example, pytorch 1.9 support cuda 10.2 and 11.1, so we support them too.

pip install cumm for CPU-only

pip install cumm-cu102 for CUDA 10.2

pip install cumm-cu111 for CUDA 11.1

pip install cumm-cu113 for CUDA 11.3

pip install cumm-cu114 for CUDA 11.4

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, 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, 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 10.2, 11.1, 11.3, 11.4, 11.5
  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

Note

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

LICENSE

Apache 2.0

Metadata

Release files for cumm-cu111 0.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cumm-cu111 0.2.9
File
cumm_cu111-0.2.9-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
cumm_cu111-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
cumm_cu111-0.2.9-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
cumm_cu111-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
cumm_cu111-0.2.9-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
cumm_cu111-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
cumm_cu111-0.2.9-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
cumm_cu111-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details
cumm_cu111-0.2.9-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 8.8 MB

Release files / cumm_cu111-0.2.9-cp310-cp310-win_amd64.whl

Download URL cumm_cu111-0.2.9-cp310-cp310-win_amd64.whl
Size 787.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
4f7b29941bfc9dab8f43b361fac0d27f7e8422a2f0f74f67c879f444a356911e
BLAKE2b-256 checksum
How to use checksums
d286756aeb2c267d46f0256b95034443a61ea9a6a8efb3f0edb062b808f42e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / cumm_cu111-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cumm_cu111-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fa8c4cee35436434b1293cd1bb3aa9c83597ce040237baf572cd09ed46a2f289
BLAKE2b-256 checksum
How to use checksums
3c6ad0e122e7f16fa45f28aa143287332de4488eea6e52a404386bf5db2c959c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / cumm_cu111-0.2.9-cp39-cp39-win_amd64.whl

Download URL cumm_cu111-0.2.9-cp39-cp39-win_amd64.whl
Size 787.5 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
5c72820959be5901eb0e99ef1ac53e4284a3b3d6874ccdd681f0b06a875ff9db
BLAKE2b-256 checksum
How to use checksums
7efc4c4f713382ca64a31bfb34d4cd3202c073adf601a6352a16e62c7d7d41eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / cumm_cu111-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cumm_cu111-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
faed8ffda989d114183e467f8e54c30ee5cfcbca4fba96a09d86c67c24375c5a
BLAKE2b-256 checksum
How to use checksums
60bedb1b3ce18b78c3468f7381cf95a324ac2fca4574587ee6e8c933e7239c6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / cumm_cu111-0.2.9-cp38-cp38-win_amd64.whl

Download URL cumm_cu111-0.2.9-cp38-cp38-win_amd64.whl
Size 787.3 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
84e62dfe00ecdeecdbb5fced8d67888961955b2c65644b1e09e59af4982646d7
BLAKE2b-256 checksum
How to use checksums
cef9a9ad1788867bc9e69cf980f0403c43f2878704bee18e66ad50e9e3dd00e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / cumm_cu111-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cumm_cu111-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fd7c5d2d1eeeee04e87339c25c4996a587aee60f44567c11532edf31e68e2a4d
BLAKE2b-256 checksum
How to use checksums
e6d661b50762f70829a75d2d3778d6fd229bf5b7d3a0c447ab27553ef895ec4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / cumm_cu111-0.2.9-cp37-cp37m-win_amd64.whl

Download URL cumm_cu111-0.2.9-cp37-cp37m-win_amd64.whl
Size 787.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
aeab9eea00db631a1caf66a549320bc66fdf926ce28ebcafce611ce21426fa76
BLAKE2b-256 checksum
How to use checksums
7a4fcabfbf316a66f71028f435af9e118e2abbcb7c3fadf443ba7baedc64effd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.9

Release files / cumm_cu111-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cumm_cu111-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0bb1a94a9ce68c880493f0677f890549dc21be0eda78f6925bf1e63bd24702b8
BLAKE2b-256 checksum
How to use checksums
36bb7ae39773fba89a53d808fc12b1011bcd31a71f6b09c443284bbb34370cc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / cumm_cu111-0.2.9-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL cumm_cu111-0.2.9-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bfd8b96c5eff4c7d23e06729861fc5c394d43ae3197ae354570db3d2dd54c57a
BLAKE2b-256 checksum
How to use checksums
d18429bbda257fb3b7fc45c7f5826b9765c5c601c773577064757eada3ecad03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

This release

0.2.9 This release

9 release files

0.2.8

9 release files

0.2.6

9 release files

0.2.5

9 release files

0.2.3

9 release files

0.2.2

9 release files

0.2.1

8 release files

0.2.0

8 release files

0.1.9

10 release files

0.1.8

10 release files

0.1.7

10 release files

0.1.6

10 release files

0.1.5

10 release files

0.1.4

10 release files

0.1.3

10 release files

0.1.1

5 release files

0.1.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page