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.

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

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.2.5-cp310-cp310-win_amd64.whl (785.0 kB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.5-cp39-cp39-win_amd64.whl (779.5 kB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.5-cp38-cp38-win_amd64.whl (784.8 kB view details)

Uploaded CPython 3.8Windows x86-64

cumm_cu114-0.2.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.5-cp37-cp37m-win_amd64.whl (784.7 kB view details)

Uploaded CPython 3.7mWindows x86-64

cumm_cu114-0.2.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 785.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for cumm_cu114-0.2.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ff45c07fe97ad71d672de67f39d6c99c983bf1e98f36268937f36070725968a6
MD5 b69c781101e247bce05c74afe43bffe9
BLAKE2b-256 28cf8a23623c2b9462769f51c6c1aed6e90620115e6ef5a6862a5065cff919fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 23132bfe56485d667f6d5c0a7a9fbff12656fc0f8cfe47eb5b827ec8db8137ff
MD5 7693c3ad386a7639784a9ad56be684ac
BLAKE2b-256 5c3837c312e150025fca87ad2d9c39631b33cc2510a8a6723ab61ca6a2f5d9dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 779.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for cumm_cu114-0.2.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cd7f7306c8ae1b54bbe90d83dc0f4b213f55197e04bd81ddd17d77bb3a6a84bf
MD5 6d84dc4736f529e8c00b624bd9ee96c2
BLAKE2b-256 7e5c0deefc769e744873468b994dcca6ff3727678639094e8548517d3a9781d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48e818066129a404f45a8e55ab546d280587e9b54e102c55a80e69aa2708c8dd
MD5 26ef659b7625658acda298a1378f56de
BLAKE2b-256 327dd63ea46e869833b4ff253633fac554814789cebbe795c5ac2bb92ffdc5a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 784.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for cumm_cu114-0.2.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 928aee2bd3a0b417071cd91c5169c330d5d819b204e8641ed473f43e03cc3e98
MD5 ba45123fe794bc1b8c6e5f021652614b
BLAKE2b-256 29df9806363ccf20d47a0815efe9ccf1781939b3da9a8db3bc3b805f6e009640

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ac960a4da62d606b232f0100b505be0d31e257e831e75ca467fa5b8c0c48256e
MD5 968f5c4e4f0b20d61cb7334e578353c7
BLAKE2b-256 8a12743a5b08bf1f6f1ecff7c32bd0fcf4100c406507c808bdfd68328edc6780

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.5-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 784.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for cumm_cu114-0.2.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2c8c1a29edb40680ea59051e9198400251d78c34f2e7c2f4a8cacdea43f78125
MD5 15db368f1aa7fd3f6b946bb2ed9343f3
BLAKE2b-256 85436b0b4435e8e0df39ece2728a7d419727605e90a25d10f4dcae313048e126

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 087191f7a86f3486cb734313a9ac640982a90c2c505895a30ab8a388f75dbad4
MD5 8e4b4055a15dbdafd1105ff345d4605c
BLAKE2b-256 a50453051ad3a6962b2b3be93882b259644e5261e6edee039e1348eea3819027

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.2.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.2.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f4b61a1182270773d3f402f044d041ff2d141a2e8008f41c884beba7bc962bb
MD5 916ec4067b672d5962a3bab146d09d8d
BLAKE2b-256 f45b47fdda1fecfedd8aa4b3bea850601aa29748ff213c58132ea7fc4c97c4dd

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