Package: cumm
cummCUda Matrix Multiply library.cummis developed during learning ofCUTLASS, which use too much c++ template and make code unmaintainable. So I developpccm, use python as meta programming language, to replace c++ template meta programming.
Nowpccmbecome a foundational framework ofcummand my other c++ project such asspconv.cummalso contains a python asyncio-based gemm simulator thatshare same meta programwith CUDA code, enable gemm visualization and easy debug experience.BREAKING CHANGES0.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.NewsAmpere feature support (byEvernightAurora)InstallPrebuiltWe offer python 3.7-3.11 and cuda 10.2/11.3/11.4/11.7/12.0 prebuilt binaries for linux (manylinux).We offer python 3.7-3.11 and cuda 10.2/11.3/11.4/11.7/12.0 prebuilt binaries for windows 10/11.pip install cummfor CPU-onlypip install cumm-cu102for CUDA 10.2pip install cumm-cu113for CUDA 11.3pip install cumm-cu114for CUDA 11.4pip install cumm-cu117for CUDA 11.7pip install cumm-cu120for CUDA 12.0Build from source for development (JIT, recommend for develop)WARNINGUse code intags!!! code in main branch may contain bugs.The c++ code will be built automatically when you change c++ code in project.Linuxuninstall cumm installed by pip. you must ensure no "cumm" exists inpip list | grep cumminstall build-essential, install CUDAgit clone https://github.com/FindDefinition/cumm,cd ./cumm,git checkout tags/<tag_name>,pip install -e .in python,import cummand wait for build finish.Windowsuninstall spconv and cumm installed by pip. you must ensure no "cumm" exists inpip list | grep cumminstall visual studio 2019 or newer. make sure C++ development component is installed. install CUDAsetpowershell script execution policystart a new powershell, runtools/msvc_setup.ps1git clone https://github.com/FindDefinition/cumm,cd ./cumm,git checkout tags/<tag_name>,pip install -e .in python,import cummand wait for build finish.Build wheel from sourceWARNINGUse code intags!!! code in main branch may contain bugs.WARNING: IfCUMM_CUDA_VERSIONis set with a CUDA version, following steps will create a wheel named "cumm-cuxxx", not "cumm", this means you must usecumm-cuxxxin dependency of your project which depend on cumm, notcumm. IfCUMM_CUDA_VERSIONisn't set,cummwill always built with CUDA, so the CUDA must exists in your system. The wheel name will becummeven if it is built with cuda.LinuxIt's recommend to build Linux packages inofficial build docker. Build with CUDA support don't need a real GPU.Build in Official Dockerselect a cuda version. available: CUDA 11.1, 11.3, 11.4, 11.5, 12.0(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 environmentinstall build-essential, install CUDAset env for installed cuda version. for example,export CUMM_CUDA_VERSION="11.4". If you want to build CPU-only, runexport CUMM_CUDA_VERSION="". IfCUMM_CUDA_VERSIONisn't set, you need to ensure cuda libraries are inside OS search path, and the built wheel name will becumm, otherwisecumm-cuxxxrunexport CUMM_DISABLE_JIT="1"runpython setup.py bdist_wheel+pip install dists/xxx.whlWindows 10/11install visual studio 2019 or newer. make sure C++ development package is installed. install CUDAsetpowershell script execution policystart a new powershell, runtools/msvc_setup.ps1set 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 = "". . IfCUMM_CUDA_VERSIONisn't set, you need to ensure cuda libraries are inside OS search path, and the built wheel name will becumm, otherwisecumm-cuxxxrun$Env:CUMM_DISABLE_JIT = "1"runpython setup.py bdist_wheel+pip install dists/xxx.whlContributersEvernightAurora: add ampere feature.NoteThe work is done when the author is an employee atTusimple.LICENSEApache 2.0