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

Uploaded CPython 3.13Windows x86-64

cumm_cu114-0.7.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

cumm_cu114-0.7.11-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12Windows x86-64

cumm_cu114-0.7.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

cumm_cu114-0.7.11-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

cumm_cu114-0.7.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

cumm_cu114-0.7.11-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.7.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cumm_cu114-0.7.11-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.7.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (22.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 335bfe38c46c6584daf1725ec0c95c6acb50818134556b462948676cc561a255
MD5 d53feaf258653acb4dba821aad7f4edb
BLAKE2b-256 062381f6c9fef0a8c66c305dce5a0fb76251c1592910c2abc01b710bd62b9023

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1aeeafd154030de40b943f98553c8bc15ecc817f0f8db96f876c13cc71a2d702
MD5 d3be441b13fc1e1c93fd88e0bf89be1c
BLAKE2b-256 52b5b8478a85a38f86879eecc674545ab05a9b4dc54c1d679546ca7073084279

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 14bfc2a3cb1bce8b78bc2b4db347fea7ecede6ed019832beb5d2043f32811df1
MD5 e175b35ec815aaed0bfc87bd14f930da
BLAKE2b-256 243635627fef5343dac70cb07d3de9e253515489447957a39c2300cdede41b3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5931fe1ecd0e4bd9bf8ffc4826ea388a8709657145241741838b4f2100ee144
MD5 93c1946f63065e597449ef4d9dc49f8f
BLAKE2b-256 fe6d9811b0158a5ef94db8f23208a7a1ac8291e95f6d102d535638595995a708

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fff6896417fa1913a79832bc80e98556a0be188aa44e43cfcbe58fd35732535b
MD5 448ef0eb8204d5b3847b56c3caf34f7d
BLAKE2b-256 e44640fceea24a7d43915003831d0a5b714d50c596c0d90c6c77ce7d9fee779e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 14602e058c233f5b57ced492f7b1b199fe09b806469863985501c05a6fdc2ae3
MD5 66161882562732bf68e812fc985069ce
BLAKE2b-256 408befb234540df59149c48dce8cafc2e2f3d2676d7a22c4db3a3c88f61936c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7460a634ad0945a53a5d6d4569e65637f0adc4b7389c386aad92afb4002013dd
MD5 18f868957160500e94a1efe08e78f310
BLAKE2b-256 1dcbb4fd700cb86c011b140dc8c905d7ed22879bd4ec8ef115957466f5061347

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de1b1b505683b0a1fe07ae6e84a79d11379fada3f974858c4cd43d63390d2dea
MD5 614bf91a349c6ad85deafe9d0b395422
BLAKE2b-256 f4facfed7eaa8e5d309235b813dc44a227d49523b1b33312055c5ce69b7751db

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cumm_cu114-0.7.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b0b3d5ecb778edeea2bad6802bdee27737d1e8912626fe609cee9dd7eb3bc503
MD5 ac76ebad66a23713f0a5719811262613
BLAKE2b-256 0cdeece6cb67df272eb28f922e7df01e87ed27433bd52136f0f9f060c6cfd691

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.7.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9637932d71e8596f68c3b3a1aad7c3005bb75f98177180dd1c78efbdfb3c6665
MD5 645dc571114f70688dc34a0eecef4151
BLAKE2b-256 ca00faa7e4d532f98ce4defae0123dd72e408e6bde35bced35cf15f5f54a6d7f

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