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

Uploaded CPython 3.11Windows x86-64

cumm_cu114-0.3.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cumm_cu114-0.3.5-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.3.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu114-0.3.5-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cumm_cu114-0.3.5-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

cumm_cu114-0.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cumm_cu114-0.3.5-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86-64

cumm_cu114-0.3.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: cumm_cu114-0.3.5-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_cu114-0.3.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 50cb91ea3fa9b5c28c04b92e3a12b4eb900919346d06715646d5f05b8fe2d0b8
MD5 f58b26c1814878046c00b185bcee15b4
BLAKE2b-256 9b50ab4a10f7ca2c02e12801b0e2afb6e28d276de3f8b13481560f5e4e98c50c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.3.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7cc005387fad19e734841ddb7e816242707e95d86e015a59d9b94c0b4abcd8f1
MD5 1e62e500811574f5b620d94f36a7c6c0
BLAKE2b-256 48ab124d1aed6768083d43bd722ea8c81b7da9c8a616d5a519d1bf7d780521cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.3.5-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_cu114-0.3.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 73d6edbef27fa410a75baaa392fd7ab186ba21d7f7634060c4db21a6cc054eb8
MD5 1ce3167b80a5b33e598fbbd2d42429e1
BLAKE2b-256 ddfd13d603059de9ee1f3e9cc27ebeb08574f2ef55ada6c9819d90dae56b0d00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.3.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6d7b167be7d7dd06cadca0f3121574dfac9aca1aac95250d682f6be71060f94
MD5 bcb4810339e80e09820388db97a1fa8b
BLAKE2b-256 527a2f502181a071dd4f414b67ea2bc7a529355147904a6b2bb757948ae8a0b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.3.5-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_cu114-0.3.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b2fa0e316aee26c688a4ce0e18912972d6b3ebc794e595da6eecdb8d457b592c
MD5 da9e8526e8f19f23ed2443c8cab41d3e
BLAKE2b-256 3be8cd3247aede5f61161e4739809d9a9ba6ae6d3719cbd6405a8b54c9a9dbe2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.3.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d59031831628807a86860ba9ebb83da2c09f9d88b658a7f47ea77fb8ade68044
MD5 d10030cd667ae6be6b75882aa7b4ec0e
BLAKE2b-256 81a7dbbdc94a11fb914c7c0793911dfc17bd5105bc2017bba937303b50572da6

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.3.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.3.5-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_cu114-0.3.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b6286ff52a6a57f324085ba04b8e6eea82d4bd12c8861ff2aa1b3dfe1be1aa1a
MD5 f2f74548c6a68a7360937abb081da16f
BLAKE2b-256 9b44661e335901de07c51d718ef31406e2ec113ce0fce0d5e07675faaffad59a

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.3.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 951c5dc3e7f393fff5dbbbeb8a407a02f0859bfbb062e886381b03420f6b23d3
MD5 868527a6473b85abbde1f83a26125965
BLAKE2b-256 a8f58ed94f2719ab4e81e7e4c7a467a4b9b24f9ea7a38613e0b432c2c07f1f44

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.3.5-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.3.5-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_cu114-0.3.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 498da115afd5110b75598ce7011527d57ee5788c829cbc3e5e001094ddf0d1c4
MD5 d212fa6a4ca93ffd1284ebf69ffaed5e
BLAKE2b-256 2b6637bd516883e84b64ebae2c4e4a0762be42c454091e55bf539cd45a1ad067

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.3.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.3.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9e2ee74f719549b706aee253d614cfb15c8ec6b97be3bc85d7bc657a38cc8e8
MD5 66ff1d4751bb5c91909d4abc02040fea
BLAKE2b-256 9df7a2b2a8361c8d1491edc76ee8b0d511c91d7804c96ab62f3d25a4410d3f7b

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