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.7-3.11 and cuda 10.2/11.3/11.4/11.7/12.0 prebuilt binaries for linux (manylinux).

We offer python 3.7-3.11 and cuda 10.2/11.3/11.4/11.7/12.0 prebuilt binaries for windows 10/11.

pip install cumm for CPU-only

pip install cumm-cu102 for CUDA 10.2

pip install cumm-cu113 for CUDA 11.3

pip install cumm-cu114 for CUDA 11.4

pip install cumm-cu117 for CUDA 11.7

pip install cumm-cu120 for CUDA 12.0

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_cu117-0.3.6-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

cumm_cu117-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cumm_cu117-0.3.6-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu117-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu117-0.3.6-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu117-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cumm_cu117-0.3.6-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

cumm_cu117-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cumm_cu117-0.3.6-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86-64

cumm_cu117-0.3.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file cumm_cu117-0.3.6-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cumm_cu117-0.3.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for cumm_cu117-0.3.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a985918903b334f535495c3a757eb106871f7b84ce8add3510975ef8ebda9c87
MD5 d6032e3ae2d35cd65302fa36f48c5a21
BLAKE2b-256 fd28aa1dad6daf19ab51b99a6b7daedc178b80bbb98826f0e7a20865ce90576e

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu117-0.3.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 874c1fac839efa5706ef851a3a9c533ad8f0249285917a5a06483e12e20c97a9
MD5 1b2277264e71dce0f212365bf0921a94
BLAKE2b-256 3174c1cbb32055bfb6d5bc1afa887f0b23e12310812f811f7687fd32046352b3

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cumm_cu117-0.3.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for cumm_cu117-0.3.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bdd8971127f58a38144d29ce5f6f4f203c65420cfa3b0875c2a74eb3081014b7
MD5 1ed27bc2e3928ea45db3ffd756154c8b
BLAKE2b-256 dec17b775c546df21b7770aadd01c005b51940e3a6d7cda05795e33be510627e

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu117-0.3.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa15627d355f1ed273f5434ae7660bb31c913ae76701f0c4be4c1c3cb5ed0f26
MD5 84074f21e162367d9c2b8196954771fa
BLAKE2b-256 572af8b75117c8715ff54b2d3fc1cbb029f22b9442ff7e7d808cc07adffd5c09

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cumm_cu117-0.3.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cumm_cu117-0.3.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c3826e82d5e7c7a7b038fc1ae53fbda9a5751eebfa14d1a50f42df191b0fe138
MD5 ce8107270e7926513356825db7a644ca
BLAKE2b-256 2a20806e99d6436440e4f88495f2f0265fa95c85c8382aca961d40caf05436f6

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu117-0.3.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a1e6c837b0da11b86178b94a1f401951211e3f2a4d44ba43e3278c7fe074cad
MD5 fdbcde368686d8bbd7f2237535866230
BLAKE2b-256 c407024b298d6070b35bbe7591da2c5ab8d9889742b5121a1f4d262274f3e410

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: cumm_cu117-0.3.6-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for cumm_cu117-0.3.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1d4967b8665d57789a46e48730dc56bf41ff663f5b50b89ae6d01e4318fdab7c
MD5 303ff7a8cd9a2a682dbb8e83a874a1a8
BLAKE2b-256 080711755cbab80cc4186bfed922d2357b90ba90de8c7c705d425aada507510a

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu117-0.3.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1331a16db501263fdfa419f237770f9676d931e30c5b5ed728c53bf05c55712f
MD5 a54194f9ffdbfa3da2c0707ebe3c8573
BLAKE2b-256 f79702ef1e443aabfdd0871bf45e05c3dbd74fcf7198f987a37257a72d927e49

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: cumm_cu117-0.3.6-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for cumm_cu117-0.3.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9c4c758614c07aa1134026293098e1e3cf2f20b9f7c479af74d2ca532873ca7a
MD5 1dcfcd2a2e451026a2694d4ff931f624
BLAKE2b-256 80f6602eb789180ca1a555ff38c6837b1fdcbf5be2d0ac75b442426d570f6662

See more details on using hashes here.

File details

Details for the file cumm_cu117-0.3.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu117-0.3.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a1b6e3e4c5cf4dfc694876d8b0a07ce410097e39842f9af7d10045ad9a4451f
MD5 14c0099190649005760363aed2de4bed
BLAKE2b-256 4bbc775aa8c8ff111599ecf680f44b4315fd02353870712a1753450a1eba91fb

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