Skip to main content

Baseten Kernel Library

Project description

b10-kernel

Baseten Kernel Library - High-performance GPU kernels for AI inference workloads.

Installation

From PyPI

pip install b10-kernel

Requirements:

  • Python >= 3.12
  • CUDA-compatible GPU and drivers
  • PyTorch >= 2.8.0 with CUDA support

From Source

git clone <repository>
cd mp/kernels/b10-kernel
pip install -e .

For Development

# Install with test dependencies
pip install -e .[test]

# Install with all development dependencies  
pip install -e .[dev]

Development guide

  • Build the library from source
make build
make rebuild
  • Run unit tests
make test
  • Format code
make format

Kernel Development Workflow

Steps to add a new kernel:

  • Implement the kernel in csrc
  • Expose the interface in include/b10_kernel_ops.h
  • Create torch extension in csrc/common_extension.cc
  • Update CMakeLists.txt to include new CUDA source
  • Expose Python interface in python/b10_kernel/xxx.py and python/b10_kernel/__init__.py
  • Add unit test for the kernel in test/test_xxx.py
  • Add benchmark script for the kernel in benchmark/bench_xxx.py
  • Format code with make format

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 Distribution

If you're not sure about the file name format, learn more about wheel file names.

b10_kernel-0.1.5-py312-none-manylinux2014_x86_64.whl (536.9 kB view details)

Uploaded Python 3.12

File details

Details for the file b10_kernel-0.1.5-py312-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for b10_kernel-0.1.5-py312-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 14799e60c1c41d7d04c147a972ec8bbe77145e96f1dbcb5159e79e86696a493c
MD5 7737c436a3a6f056f19544d72912952b
BLAKE2b-256 4b6faabbfb5240b154a8945b6d5997ba7aa7aa48c1152c54129ce39c963a5e4c

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