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

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.9-cp39-cp39-win_amd64.whl (786.5 kB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.9-cp38-cp38-win_amd64.whl (786.4 kB view details)

Uploaded CPython 3.8Windows x86-64

cumm_cu114-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.9-cp37-cp37m-win_amd64.whl (786.4 kB view details)

Uploaded CPython 3.7mWindows x86-64

cumm_cu114-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cumm_cu114-0.2.9-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.9-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 786.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for cumm_cu114-0.2.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 725a21456b8a7da0b579ec94783298b8230669e780e424f03efe9517e90c83ff
MD5 d33351dcf8f54a22aefbc48a13a41a17
BLAKE2b-256 7ea8306a560e1ebbf9cc38e4fd2dfbcdecfeed4a780d3daaa160b985357e40ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d650259b8e42b0a71e856559622fbc3e0e5c3074ef9083cd15092f445909742
MD5 3c7950f7a8b0484ff6b960fe10373d94
BLAKE2b-256 41e87933a0f19ce9363944a8907ad51dcbcfdae060d2772f3be27ce59cd2ccab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.9-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 786.5 kB
  • 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.2.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0ddbce0ca62db7c7ed62783144188338786df102099639c1da24dca7d8c69664
MD5 e14aaa9d93c967e3cd053f796cf0ac5c
BLAKE2b-256 ae5b304fc541ea8ff3ffa03f3344202483120b2ca03efb0a4b123b90188e2d9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48edddef99c4fd4b90fb0782b394d36274ea58756cff7eba70d7f0337e446a28
MD5 47b7c3a370cd3cec5b93378746860a34
BLAKE2b-256 4ab01cccb38228c93afa32443f715b6978b006c5461d64d0aa5c948cdbeba096

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 786.4 kB
  • 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.2.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6fd4f6f38b81318621da8820f7d4c0310dc5270139311007d4e8df225d088261
MD5 4159fafea84b7a4629ba9ae636a7901d
BLAKE2b-256 87887de9482573ab9428a40b41a40217efaa51e6c690062aa921379d999f5919

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d66b7786f4f37b9fac06ae3da30fec0817ddf02fd7ffd02996f636e2c6939da
MD5 70b2d4c32aeefb8e6bed0abb29f87409
BLAKE2b-256 64292aeeebfafe863ca001f72a904f62f3d47ddc5b41c3059eebadad5aa25386

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.9-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 786.4 kB
  • 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.2.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8901b8ec9ffddc98a70b8df8aab62547131d12e755e98b6b2c0c174b8aac5761
MD5 9768926291b8be6eeb00950d432f0037
BLAKE2b-256 de5faa21ddcb0d060ab08e7c13fc14efefe37bb7352c8622855763258c17d2f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28d0ab0dbfc156c67669b512bb6466cdccfc1b5a457b481aab154086650d8da2
MD5 61f65d5ff7306d71db1da28fb4e1093e
BLAKE2b-256 8b13b8dce105b3c45b9e2b2b5d4a9ff970abfc15c08426f036ddf2a9e01e53fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.9-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfc9dd76d349132e9216be80524c61d12b29a05455318c5ed380bafa4ac5f8fb
MD5 432e90a284c9e7c4363a9ac5e6cf90db
BLAKE2b-256 849972d89ab277df8c746405a56fdc7bbdcc997f46aa220d24e8eb0a0722bc1f

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