kmm

KMM: parallel dataflow scheduler and efficient memory management for multi-GPU platforms

https://github.com/nlesc-compas/kmm

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords

cuda dag dag-scheduling dataflow gpu gpu-acceleration gpu-programming hip hpc memory memory-management parallel performance scheduler
Last synced: 6 months ago · JSON representation

Repository

KMM: parallel dataflow scheduler and efficient memory management for multi-GPU platforms

Basic Info
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • Open Issues: 3
  • Releases: 5
Topics
cuda dag dag-scheduling dataflow gpu gpu-acceleration gpu-programming hip hpc memory memory-management parallel performance scheduler
Created over 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License Zenodo

README.md

KMM: Kernel Memory Manager

CPU Build Status CUDA Build Status HIP Build Status

The Kernel Memory Manager (KMM) is a lightweight, high-performance framework designed for parallel dataflow execution and efficient memory management on multi-GPU platforms.

KMM automatically manages GPU memory, partitions workloads across multiple GPUs, and schedules tasks efficiently. Unlike frameworks that require a specific programming model, KMM integrates existing GPU kernels or functions without the need to fully rewrite your code.

Features

  • Efficient Memory Management: automatically allocates memory and transfers data between GPU and host only when neccessary.
  • Scalable Computing: seamlessly spills data from GPU to host memory, enabling huge datasets that exceed GPU memory.
  • Optimized Scheduling: DAG scheduler automatically tracks dependencies and executes kernels in a sequentially consistent order.
  • Flexible Work Partitioning: Split workloads and data according to user-defined distributions, ensuring utilization of available resources.
  • Portable Execution: supports existing CUDA, HIP, and CPU-based functions; seamless integration with minimal changes.
  • Multi-Dimensional Arrays: handles ND-arrays of any shape, dimensionality, and data type.

Resources

Example

Example: A simple vector add kernel:

```C++

include "kmm/kmm.hpp"

global void vectoradd( kmm::Range<int64t> range, kmm::GPUSubviewMut output, kmm::GPUSubview left, kmm::GPUSubview right ) { int64_t i = blockIdx.x * blockDim.x + threadIdx.x + range.begin; if (i >= range.end) return;

output[i] = left[i] + right[i];

}

int main() { // 2B items, 10 chunks, 256 threads per block long n = 2'000'000'000; long chunksize = n / 10; dim3 blocksize = 256;

// Initialize runtime
auto rt = kmm::make_runtime();

// Create arrays
auto A = kmm::Array<float> {n};
auto B = kmm::Array<float> {n};
auto C = kmm::Array<float> {n};

// Initialize input arrays
initialize_inputs(A, B);

// Launch the kernel!
rt.parallel_submit(
    n, chunk_size,
    kmm::GPUKernel(vector_add, block_size),
    _x,
    write(C[_x]),
    A[_x],
    B[_x]
);

// Wait for completion
rt.synchronize();

return 0;

} ```

License

KMM is made available under the terms of the Apache License version 2.0, see the file LICENSE for details.

Owner

  • Name: NLeSC-COMPAS
  • Login: NLeSC-COMPAS
  • Kind: organization

GitHub Events

Total
  • Create event: 3
  • Release event: 1
  • Issues event: 3
  • Delete event: 2
  • Issue comment event: 5
  • Push event: 283
  • Pull request event: 3
  • Fork event: 1
Last Year
  • Create event: 3
  • Release event: 1
  • Issues event: 3
  • Delete event: 2
  • Issue comment event: 5
  • Push event: 283
  • Pull request event: 3
  • Fork event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: about 1 year
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • isazi (4)
Pull Request Authors
  • isazi (6)
  • sverhoeven (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Dependencies

.github/workflows/cmake-cuda-multi-compiler.yml actions
  • Bacondish2023/setup-googletest v1 composite
  • Jimver/cuda-toolkit v0.2.14 composite
  • actions/checkout v3 composite
.github/workflows/cmake-multi-compiler.yml actions
  • actions/checkout v3 composite
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • ad-m/github-push-action master composite
  • sphinx-notes/pages v2 composite
docs/requirements.txt pypi
  • breathe *
  • exhale *
  • nbsphinx *
  • sphinx_rtd_theme *
  • unidecode *
  • wheel *
.github/workflows/zenodo-release.yml actions
  • actions/checkout v3 composite
  • rseng/zenodo-release main composite