Skip to main content

A custom CUDA-accelerated ML library

Project description

Aakaar

Aakaar is a custom, standalone deep learning tensor library built from the ground up using Python, C++, and raw CUDA. It is designed to provide a lightweight, transparent architecture for high-performance GPU computations without relying on heavy external frameworks like PyTorch or TensorFlow.

Core Architecture

Aakaar bypasses standard NumPy arrays by implementing a custom C++ Tensor object that resides directly in GPU VRAM. Python interacts with this data via Pybind11, acting as a lightweight remote control. This prevents severe performance bottlenecks over the PCI-e bus, keeping data on the GPU until explicitly requested back to the host CPU.

Current capabilities include:

  • Custom GPU-native Tensor class lifecycle management.
  • CUDA-accelerated uniform random number generation via cuRAND.
  • Direct host-to-device and device-to-host memory mapping.

Installation

To build Aakaar from source, you must have the NVIDIA CUDA Toolkit (nvcc) and a compatible C++ compiler (e.g., g++) installed.

  1. Clone the repository:
pip install aakaar

quick start

import aakaar

# Initialize the CUDA engine and allocate a GPU Tensor
print("Generating 100,000 random numbers on the GPU...")
data = aakaar.rand(100000, device="cpu", seed=1337)

# The data remains on the GPU as an Aakaar Tensor
print(type(data)) 
# <class 'aakaar._C.Tensor'>

# Bring the data across the PCI-e bus to the CPU for inspection
cpu_data = data.cpu()
print(cpu_data[:5])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aakaar-0.1.3.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file aakaar-0.1.3.tar.gz.

File metadata

  • Download URL: aakaar-0.1.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for aakaar-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b07fccffbe35dbe1b486ac5ae24fb2f3de754ae5bcbd8fa4d3bbf5f08b6612b5
MD5 34d2586fe804a0b949075a5133c97d12
BLAKE2b-256 d4a9fb4f868659412defaa6f0d287e51177ff520788d13b8f18c4a04efe5475f

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