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:
git clone [https://github.com/YOUR_USERNAME/aakaar.git](https://github.com/YOUR_USERNAME/aakaar.git)
cd aakaar
pip install setuptools wheel pybind11
pip install -e .

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.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

aakaar-0.1.2-cp310-cp310-win_amd64.whl (95.9 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

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

File metadata

  • Download URL: aakaar-0.1.2.tar.gz
  • Upload date:
  • Size: 5.5 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.2.tar.gz
Algorithm Hash digest
SHA256 c1fb1b4f9adeac1a2640c7fe6f13382e111f7929ad16a7856c9846dcfa7acc60
MD5 b47749535fc810b3f0a24a28797c1788
BLAKE2b-256 3c83b6054f978892618634643ba99b6814091d07b250f4618377e089f159b302

See more details on using hashes here.

File details

Details for the file aakaar-0.1.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: aakaar-0.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 95.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for aakaar-0.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a2b73d8e0e6549b8b30cf1d182a205d72ee852a857e966aa6605793fb5cf391b
MD5 d44b9a5648eb68e162b26b794ecb8e17
BLAKE2b-256 0a8eff331e5764fc59734dd64a5c74f6fd720172f258287c70826b237b3f49db

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