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

Uploaded CPython 3.13Windows x86-64

cumm-0.8.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

cumm-0.8.2-cp313-cp313-macosx_14_0_universal2.whl (1.4 MB view details)

Uploaded CPython 3.13macOS 14.0+ universal2 (ARM64, x86-64)

cumm-0.8.2-cp312-cp312-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.12Windows x86-64

cumm-0.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cumm-0.8.2-cp312-cp312-macosx_14_0_universal2.whl (1.4 MB view details)

Uploaded CPython 3.12macOS 14.0+ universal2 (ARM64, x86-64)

cumm-0.8.2-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11Windows x86-64

cumm-0.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cumm-0.8.2-cp311-cp311-macosx_14_0_universal2.whl (1.4 MB view details)

Uploaded CPython 3.11macOS 14.0+ universal2 (ARM64, x86-64)

cumm-0.8.2-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm-0.8.2-cp310-cp310-macosx_14_0_universal2.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 14.0+ universal2 (ARM64, x86-64)

cumm-0.8.2-cp39-cp39-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cumm-0.8.2-cp39-cp39-macosx_14_0_universal2.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 14.0+ universal2 (ARM64, x86-64)

File details

Details for the file cumm-0.8.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: cumm-0.8.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for cumm-0.8.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 607304ce5f098b5da29dfffa0de0469783ac3d461a11b57341b0a6c9bffcaf06
MD5 d4e45fdd9cb9805871feed601980bc8a
BLAKE2b-256 39a72d9b554ce973c8e6c5ef7d07905c74b22a640037c05286937650fa4da778

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b78a1a261402776a7464e3e42abbf2c7beea0fd4c9ade46558970a55f4458bff
MD5 bdb790e5a37236e8f53794b3fcad2438
BLAKE2b-256 ad02192d2e6ea922073e5ae0778fcdc992391ac12f57ac43d98429bb5e41061e

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp313-cp313-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp313-cp313-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 f08ce126c10df62ba8718d38b518114f8461f9a61867bd758a99ff657308bcf5
MD5 a17eb9bab69e7af1b175038da31fe876
BLAKE2b-256 211776ba3a28c19c287a607b8490bb07e480b19575e8e6ed4988447753373583

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: cumm-0.8.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for cumm-0.8.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 038a267f54b96f9c137ad58dcff45bc32e61b10adcdc2b68433dfc91af84976d
MD5 d19e4c26374740e73ba889cfc13c276e
BLAKE2b-256 cf1c4d4c96640c7e05de8bf732f3f016e07bb98f9e6e07d9972b13f84f724287

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dabad0783e1f8a68cae6488c1d78f0584115ccdb909e2ed36c4fee141b650c96
MD5 d2a1b81e210f836a8541b21cfdbd993d
BLAKE2b-256 d8fa2394042e25018049b8a8b74b314c2375e528be7b0cab59865c3154d9921e

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp312-cp312-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp312-cp312-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 db09b7df2fc900d0c1c24ebd5022fe026e86d8f6e135fff31aeb187ae8afa9d4
MD5 7cee00b503757ad1b915ad83e286daf4
BLAKE2b-256 51687688a200ce019b42a115cab772161383d30ea83dbddbcbef88cda8af8e3c

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: cumm-0.8.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.1 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-0.8.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 37104fd61573dea453e2292e08ca983cbcbbc8bfd16636519e3e66c5586014ac
MD5 04d730222fc99be1d5cfa7f97d9761f2
BLAKE2b-256 fc895a62af5d7125d43f40d94b19e47537bd5f5dc1c7df7fa04bd8796576a662

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94a15797fb7be3edb60d358a20ffc802a66506987d94f07d9b66a82ebd9f813d
MD5 ece415fa1d504084082aec188f25028e
BLAKE2b-256 edefe8409cbb4bf670c430d134a155853615095924ab24858a0b2c59d2a19b31

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp311-cp311-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp311-cp311-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 329a5a5b5fc8161e4acd630d4e54f68c60228817bbfc2052dd147b5e96cc3625
MD5 f1ab2e56e37178cfe84b901120ce8c92
BLAKE2b-256 4daa505cdcc2de5d9e0f3f10cf3e4644114850be4f3c26793df46fa053862f9d

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cumm-0.8.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.1 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-0.8.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7590b1c2d4168086075da1013688ace8ae935dfa1fd04930b0fab730d7a2281b
MD5 7b7f94c55b5d10d9501f01db67cd801a
BLAKE2b-256 e3b361e120302fc1aaed3b5b19dcce07a331b248a1663cf313cb8d1bb9263358

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2959f3a30222f8a09fb94b1f21f91ed4c778259d2fbfce3cb6c7a1f71145343
MD5 d55b4352749ed0515c18c7e5a9610cea
BLAKE2b-256 305dca726901bc5579ed167e302e427fc406ec51419ae9229435d60cc6f63af4

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp310-cp310-macosx_14_0_universal2.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp310-cp310-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 f3cfb2fd5246c43fe046a08b7ef833f3368795512f5f6fdff0465f14f83da161
MD5 5fcb0d6ff8a97ca8a79e06ba18f03baa
BLAKE2b-256 6e2ae51b45f35e204bd48c877639e402d0dee4a5a7d3eb2385b987635dee4719

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cumm-0.8.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.1 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-0.8.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f5297c35708e59bd8d0660ddb6a6a1fb1af80f2c46a31424ebed24d0eda0596a
MD5 4af334d777d269aa07cfb5a5fefe5ce8
BLAKE2b-256 0204c664cfff2cd0a0479b02c99342a2884a8a9f29fe01cb22387af43960b1bf

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cumm-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd14ca57c9fd9278aff07b51786bfb9b626c621f4c43a3fd8ea31560300acc74
MD5 e729a88743240c2163aceeb2f5e49998
BLAKE2b-256 bdfae5523bb4beaaf2457bb1df507847bd6796fdc2a8d888f45dd4b07e6c5062

See more details on using hashes here.

File details

Details for the file cumm-0.8.2-cp39-cp39-macosx_14_0_universal2.whl.

File metadata

  • Download URL: cumm-0.8.2-cp39-cp39-macosx_14_0_universal2.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9, macOS 14.0+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cumm-0.8.2-cp39-cp39-macosx_14_0_universal2.whl
Algorithm Hash digest
SHA256 b5f1bf3c1a602c19267135060aa76b50da4a7ec8fa85427e814e22d9e950dc4c
MD5 f0f991242eb8cd2c36613543a7c9dbae
BLAKE2b-256 20915a0014264b7330e244817a6ac74ef6f10eae7813e067c7c82b0906caf746

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