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.4.tar.gz (6.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.4-cp310-cp310-win_amd64.whl (98.8 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

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

File metadata

  • Download URL: aakaar-0.1.4.tar.gz
  • Upload date:
  • Size: 6.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.4.tar.gz
Algorithm Hash digest
SHA256 01a5e8ebbceb9f307bb1ff16d659524d78997ebc0674da81430e181a58616bad
MD5 a3f795fd72e8cefea64651cb15570450
BLAKE2b-256 cd8e2f1eec703afa3397e657c4b1edf6c59d8c86e1a762a327420dadad0bde1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aakaar-0.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 98.8 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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3c586df84693c0be5f1ddc8702312945d5880471275aae9f073d5e1c1ae210b6
MD5 74a6d316ad216c905714c656c68fa8c6
BLAKE2b-256 7ed54a650139fa1177192105785524590a9a6a6075c66fb08a6ca6a07962e901

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