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_cu114-0.8.1-cp313-cp313-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.13Windows x86-64

cumm_cu114-0.8.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.1-cp312-cp312-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.12Windows x86-64

cumm_cu114-0.8.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.1-cp311-cp311-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.11Windows x86-64

cumm_cu114-0.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.1-cp310-cp310-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.1-cp39-cp39-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file cumm_cu114-0.8.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for cumm_cu114-0.8.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c170da16bb133e591c79080172fdbdda52134e6dd8c1a99902a32ad9d65f537d
MD5 fc1673153f41e7f42d08471f26e8f026
BLAKE2b-256 0fe9d49ed6db0e11b7c22cd1cf16ad4764894ea5c6cf3abbe8bf130cccc8b65d

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a837a87357b5f91e6ba5fbf373a43d24342eae04aafa474b3c31b1f49f2c24de
MD5 94b880244f15d72b5de29005e6cf5151
BLAKE2b-256 bc0ae2f68271831754355b645adc485ea8fb83924e1227fdfe7c24b7a9724337

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for cumm_cu114-0.8.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4d9f672183bfcff17fafe13e06c48d350c31ca7be3194539524ce8eef040027d
MD5 5db3a845ead88dac331cecfb3b0a1191
BLAKE2b-256 bc4b0e00356ce9ecfddf5d3032de7829ed076bf0b0bb5ba81050440a72c4c432

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1f5f1ccd07cf3ada71c817dcc9c1de1e5c487d8a8c59067cf577037484e8a87c
MD5 2809419c830942dfb7c21e8e7704fb8e
BLAKE2b-256 0156c9887c386d1aa26d3726f3f05049b639ec1471c94dc9c9028bb0c3153e5f

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.2 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_cu114-0.8.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ba83dff2db8110c45363e4cd6b6fb11e2780787d1ec61e5c0de3921ae8aee4e5
MD5 422a5167625d128078d2dc94d3a8b5b5
BLAKE2b-256 8fa7fa220cbe3e66bbe6f715f123fe2d608377756319f1221e2c31668ec5273a

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa5c460eeb3cc438a11a024fefa3d0b65b1d5ff1c33f2da08738a9bae3fc4917
MD5 413f639350e209598f2a37fee5e4f2b1
BLAKE2b-256 9506465c0e46f5c8245cc98d373fb8dfbf26004892e4e421fe783c04c9c73141

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.2 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_cu114-0.8.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 62fc1ce4f1ce40bb367385c6b360d1398ede6ee2858ac4b950a483617ac40b78
MD5 d783291eb64c46c2b861882fcdba1a1e
BLAKE2b-256 7ce10ba0effe303960529749cacac6e7f9159f076166a98dacd8cede88caa127

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bdcf09689ca02c0866db2b979feca0cd0c42bdd57be8be935fb43970acb30af9
MD5 29d8f190318d08f9a4bc4b62cc791ddb
BLAKE2b-256 19417cc7872158a7b616c0ce0f83b89636521e8046461dbebed5bd3e1f55a895

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.2 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_cu114-0.8.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 54a8a40e796ab7f624ef900be83c7d6e464fcdb0195edf1dc57defebcbb28b0f
MD5 846d52845629bf6b6401f7dbbb034086
BLAKE2b-256 0f7d1eb21c340e3ed235c478619b1d572cc3bbe49ba0b543b586008e0fd1fdf9

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd7f2fa6bf10355d7bfe0b6b24e2186978af4f5e628830cc39accfd586ebb3b9
MD5 0a2f8160732de59e7cf45aec31648172
BLAKE2b-256 166e582e53cbc8817f905b1a5b0cd55165585d1ec97b6fdb96ffe086b9e3b9b2

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