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

Uploaded CPython 3.10Windows x86-64

cumm_cu114-0.2.6-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.6-cp39-cp39-win_amd64.whl (779.8 kB view details)

Uploaded CPython 3.9Windows x86-64

cumm_cu114-0.2.6-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.6-cp38-cp38-win_amd64.whl (785.1 kB view details)

Uploaded CPython 3.8Windows x86-64

cumm_cu114-0.2.6-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.6-cp37-cp37m-win_amd64.whl (785.0 kB view details)

Uploaded CPython 3.7mWindows x86-64

cumm_cu114-0.2.6-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.6-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.6-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cumm_cu114-0.2.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 785.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 94e2975b859aaf90f6667ca2506ea9a2bde3d71751dd7761e0e51f116711921b
MD5 1a8e7780a08bf8f847b15149e998764c
BLAKE2b-256 3dcd4389c3b077386df17a998d1e18f12a077c79657afa18e9fb477e025c8ac9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33c9e9724456e9a1a27e8194241e1e8ee7243a06c40d59b673fd7f6486eb625e
MD5 c751d73a05c09b507adc2b923c41d9c7
BLAKE2b-256 64cd6d61122685b5d201a34e91f581b7024ea782cb21141bda09cbdbd3e1627f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 779.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 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.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 652b0f9dd31874956401983853b25afa439e5367376a07f145df3095f814cb06
MD5 d389d4cc30fed79785eb9891b117abb8
BLAKE2b-256 a373fdb1c3763bf8dce6ed27e04592fef5d383f97d99015c62c8e3b8ba4a2fb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8748f60f161236a9ee9ae2b620b8007e47f4f324df6f995b02dffea7e2f7ccf0
MD5 3b3e7b38889f97586758b5b5f91aa6b7
BLAKE2b-256 e14da996afd5a741d1496691008f3362ef7b8c24bd949d8cb2b63694f406756e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.6-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 785.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 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.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 fd32759298ba2de108770a3bd3837753636fd8bd28f90b7850faf5123c99faf9
MD5 ce4742d7d9fafa6b009939e55a6f3bfa
BLAKE2b-256 caf1f0854319bc6be283f5d95035d46c4d86564d89d17dbfff84f73da2fe76cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2a7d392d932acdb8932dc33eb6bd0ab561e7846925eacb612b56b6daed04e1dc
MD5 3a5cc5593a9cbdf9f418f6175d46a254
BLAKE2b-256 07ffcedb2508e4849d8ac4b9a537de09588aff08827eab096ca6812d0b611926

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cumm_cu114-0.2.6-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 785.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 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.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9cf2161f5c5d1875cb6ad5d79b75fdd1375c5835fd5f9af4ebdec7763b921021
MD5 f70654fc73791daf5959b20539c241f9
BLAKE2b-256 00dddeb583fb5f7026836b3bebae97dc354f6880c150a3e9761eba5d6636a650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2804f36d1f5a00bf844bca39475ec91be9bf2db146cdc71c843dc03637a4f926
MD5 387f4dfb8dff52f5502a94b8c7a3c659
BLAKE2b-256 f363dc0009544ec2ef5208181d6169cc9875109d8e93640c8d89c470c0d74dd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cumm_cu114-0.2.6-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c7aa291ed26986c074df211a0a3f0274155e2af84df31b168ff10ba28a264cc
MD5 e2e83dbb5376037eb8c991f4ed06a77c
BLAKE2b-256 c7c9e8b6eb89b084042df04bdcc190fcca33db9132f0e583c7055b77ccf0e1fd

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