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.9-3.13 and cuda 11.4/11.8/12.1/12.4/12.6 prebuilt binaries for linux (manylinux_2_28).

We offer python 3.9-3.13 and cuda 11.4/11.8/12.1/12.4/12.6 prebuilt binaries for windows 10/11.

We offer python 3.9-3.13 prebuilt binaries for Mac OS X >= 14.0 (Apple Silicon Only).

pip install cumm for CPU-only

pip install cumm-cu114 for CUDA 11.4

pip install cumm-cu126 for CUDA 12.6

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.8.0-cp313-cp313-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.13Windows x86-64

cumm_cu114-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.0-cp312-cp312-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.12Windows x86-64

cumm_cu114-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.0-cp311-cp311-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.11Windows x86-64

cumm_cu114-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.0-cp310-cp310-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu114-0.8.0-cp39-cp39-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file cumm_cu114-0.8.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for cumm_cu114-0.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 567bbdfe41bc83c9018fad0277a3067f21d94b61429a8d78212dd4bc3df6fc1b
MD5 5e2c5cb01af8aca403059f79f50eaab6
BLAKE2b-256 cd286c36799a7df6fd62af0d18ad3df9196de1ab017441c398644d695329b2d7

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b75f2dc02d779ab92c4eaea992db213c099d40ce113305216be8ccd37e091a25
MD5 635919b373ec3d3200dcd53d585a3bae
BLAKE2b-256 a5b7dfdf1068f43a4c1ffa9e2287beee353eb31ab55aff19b4c51b2e491c4259

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.8.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cumm_cu114-0.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d3cdc4b958d09be4ddde1e2503aec949921a1e2af7954e13ad6fb2442873901b
MD5 c71f5486583bb3f10583dea4508df9c9
BLAKE2b-256 b0c4eb76b9505f70641e27cb866e5e18937b9f8ca7c63a0ae99a56e107f134cb

See more details on using hashes here.

File details

Details for the file cumm_cu114-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm_cu114-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 addc2786a9b02a4d85592adc059bc12faf8c06b3ee73e3a47d0b0acfbde2e4fd
MD5 6b0f77b7ebc47b7d721f5c5d3fc9dff6
BLAKE2b-256 6d2a32e29e1f453bf8667a77ce137e5b2ef285fe3bfec6abbfac5e57ee175ad1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.8.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for cumm_cu114-0.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0aa3f8d495fed6fe9075768bfe0fe1f7276a6f823130cd686485be925fbef962
MD5 1c8bb0c256df99e98546e3b32453434f
BLAKE2b-256 99165c36130c5172635f5b89db80a3f81d4ec5af52cca4b7b15f67ebff872920

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 845becaf2365b83c5f2a41fb321ebfc4bfae52d2c49d8c11981c9e9c1f0a57e4
MD5 233e18b6ebb6b2e417518a26b6f463e5
BLAKE2b-256 8c3c372f609544c6c86e64ee21b65de724cc532278d6803ec651a6e099f726a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.8.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for cumm_cu114-0.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 666d16e317d83744ca0ed0c6fdcb40f7c955c27e289c11821d57150057032a7c
MD5 0a8bd9a6fc09a1c06ba876bf8c227330
BLAKE2b-256 806262890f6f56b77a90737d6404687277fdcd3ab28d71717c8fae19077e1e4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 027c57957feb2c2167633f3d1a017309b2682bbfb4850a90258d7df41487eb97
MD5 9dac1f3dda24f582c75ed7098654cfb0
BLAKE2b-256 ad23735c73d5a8ded0961e1f293e4b65000afd15d60478b0a94dc09e8c1f78a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.8.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for cumm_cu114-0.8.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 38bd0aebfd38c72df9efbd2b433dd611c4f75749d84af0a3f873053454a12f5f
MD5 db4555ebdddaac5bf18bcbc675b5815b
BLAKE2b-256 b2ec08483428d84d40adc5db7257e22df51703609ed9bac87aef2d0f05f5b0cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15972d0224a0115b4e090bbe244794e3c2cb06a1f5fd6b83685677dbff5fc9e3
MD5 0d124bcbcb964b8c1e65c40eca00dd87
BLAKE2b-256 2b35e0abdab30d626cdb54c3445006818dca817945e444408959a76bb344c52e

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