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

Uploaded CPython 3.11Windows x86-64

cumm_cu114-0.4.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.4.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.4.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8Windows x86-64

cumm_cu114-0.4.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.7mWindows x86-64

cumm_cu114-0.4.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: cumm_cu114-0.4.9-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.2 CPython/3.11.3

File hashes

Hashes for cumm_cu114-0.4.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9d81e3a6d0410a281d9d8daa99492919d050162eefa665729a8b7c3b182a2cf7
MD5 1f141f1f35639459a664df25571efab7
BLAKE2b-256 c4a8f640ecb7ec07812f8dbaf7a89f400b23f30fc3fb0b358df8487f001595fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.4.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba6869454ea0b328384805563eddcd544c5d159841287c0ded1e5c6dfcef6323
MD5 375b93f0275fe3a68257a4e9a4e6a8ca
BLAKE2b-256 9c4e109bc8b0cb005c3df0e439ca27c2d904fe6520693e91d43ec09efc590bac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.4.9-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.2 CPython/3.10.11

File hashes

Hashes for cumm_cu114-0.4.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 afe328552432b971047b387de1769f804227e32288b9bf947cfed52ce1b05830
MD5 3b0a9b328949cd768fd7dcb23b6c5f38
BLAKE2b-256 7932fd8b68086b82d9bfa47b52aadcb0e6cb0e085112288f7891cb75b286bc1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.4.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 910ccd22846c713a12bc9d0150a9bc7c86c81c757915001fa3fdcc528c22f7ab
MD5 61d96dfb9c43fea2609eeffe716246cd
BLAKE2b-256 2ca8cc6c74f2e92e6a66415d748849b6026f588cad0253f179005369b4b3f5e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.4.9-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.2 CPython/3.9.13

File hashes

Hashes for cumm_cu114-0.4.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3b1c8aa2f54b51aa27027f3300ee392a65cb753a1a7305a7ac73953bf84014ec
MD5 027cbe98c445450493e6220e08520dd0
BLAKE2b-256 a462c6ebe2c5281568cece73ea4c0d16e3ed7a21b064eca1f5296016d29e5687

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.4.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e36dc88c3d34be59d84cbd49da8567333c6e21f23fa40a3a321af3ad105c27e6
MD5 6528c84e63fe0a6ea700f4e3c011a794
BLAKE2b-256 dc3bbe7242c14d8e0f9ac001d68abd352334c0034e7acab781021980c93f7640

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.4.9-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.2 CPython/3.8.10

File hashes

Hashes for cumm_cu114-0.4.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5f2873082ca5e250a1912f636585bd923aee1744410c6d17f42f040d7c8798d0
MD5 40b77ca5b0a96b6f24250a1da6c7d03e
BLAKE2b-256 34158d105b5e69616ca0ee82a1727424bdb8bc3e718b67640d46ac471fec9d08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.4.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a599013266ed0cf9186ccb4cd25ad526acd1950c77be67482ca73a91597cfcf9
MD5 8fc947803731651c202500d241316b5a
BLAKE2b-256 0970e813043739d235c1906d06c1e11ea4880e2f176e4367e16d2ec73235d7cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.4.9-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.2 CPython/3.7.9

File hashes

Hashes for cumm_cu114-0.4.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8681d2a8d18d7644408954d146a72554142375d6a0de983ffc9a6bd6896ba16e
MD5 84612ecb6cbbad6fe39e482ec0a09cc2
BLAKE2b-256 bf5deb4f2211380be3cab98dbd1bf0e55cf43d04bde66e00f6dba45d62c7e4cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.4.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d5379c9761e25a92f20f1f8a0737c20fd62ab288006dee5c4757bdd67d35e70
MD5 1a217682d0a4ac8c1560c4dd86e1ed2d
BLAKE2b-256 12106184028364893aad72eab69735b917c607d179c280a90a9ed865af61ff17

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