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

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.2.8-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.8-cp39-cp39-win_amd64.whl (780.0 kB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.2.8-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.8-cp38-cp38-win_amd64.whl (785.3 kB view details)

Uploaded CPython 3.8Windows x86-64

cumm_cu114-0.2.8-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.8-cp37-cp37m-win_amd64.whl (785.2 kB view details)

Uploaded CPython 3.7mWindows x86-64

cumm_cu114-0.2.8-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.8-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.8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.2.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 785.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 583eba45c0a1259de5a4de9f9137c19c0c0dadd9469427ecb1f1fdfbb904421b
MD5 ad5513227239664c09347cd6839e0355
BLAKE2b-256 a89ba0e8171cd835b53387590b97a83615249057700c738e43dda695f1c73ecd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db4e995faae0307f4253cd0d9c90655f58026936621a3c4d080bd1320a58fedc
MD5 87b8423186167cf76376f39b9c117749
BLAKE2b-256 5ddca5e22d439412536dfb0ed520fd1aee7b25487d6b5483f51bcb6b89ebe9cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 780.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 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.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 dfb00447f5fa639e568272a578ae6c151f772eeac4cbc468bb66fb90ba9554ee
MD5 ecb90675c11d9b80af4987a4f8efc239
BLAKE2b-256 93ef71b7bf583a940fcafbb344db3c96efa1ed2f85cffe08df75f3dc0a8a0cb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7a4063f9a6845c383d506fa8b08c1cb0b195661cb43056b02e5af30e7cf0e115
MD5 e210d78bfbae85da789fc425f76f9bfd
BLAKE2b-256 a9ecaa6c6b5d803e1e8541613817be9e8bb6118a32e2af94df2fdf2f6af1e1e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.8-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 785.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 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.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 52fc9a26e8a24f6602b04e8e15957e62a7a593a0ef55e1bdde97ef2802edd761
MD5 cf0bc43da7b9d0fa148402815c8db9ae
BLAKE2b-256 b0cad003522c4bc4128a32717436fa34cf07b0a62bd4874a053e91fabb933c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a77a10c2fef56bc51d1b7af9195e67c67582f5331d4e4fbbfe971b4ae3cac37b
MD5 75aed28a6525bd0523b7d0cb70a1fe24
BLAKE2b-256 f5d1e1ec88aa100fdd29963fed97a4850ecb52aad26700be83c79a9193c08d7a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.8-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 785.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 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.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 58f54c53d129108c56453d895d3668a5af9c548d88369ba39b560214cf6aa02b
MD5 20656eae2a9fec008e79bc98b70279ee
BLAKE2b-256 55550db072280a73495836ec5dcd2131f5d4e2a97c1fc716ee16b67a5e251c03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a2a9975ba851a0c12b7bbf682bdfd0cf96301d20eec08d51a02aae93d88cb873
MD5 1cee72bc909f7cd6f3f7f997f556a653
BLAKE2b-256 e2b8856907147fb9babdadab73b6510ddb1dcfe4ae7209b6ca86ee8f62c06271

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7e1dfbd6083aaada24a72d7a2138076dea8a12f7d855e9c36ef80d5b3191b41
MD5 dead79e36a94b22c1884b2f2483e13d4
BLAKE2b-256 68fb897e70abeb9149c4d06ee474f8115cf4626a260ad8b03b67b2443bf95ea7

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