Skip to content

refactor: extract cuFile/GPU runtime into abstraction layers#539

Open
potatogim wants to merge 1 commit into
hpc:mainfrom
potatogim:refactor/cufile-abstraction
Open

refactor: extract cuFile/GPU runtime into abstraction layers#539
potatogim wants to merge 1 commit into
hpc:mainfrom
potatogim:refactor/cufile-abstraction

Conversation

@potatogim

@potatogim potatogim commented Jul 6, 2026

Copy link
Copy Markdown

cuFile calls were inlined directly in aiori-POSIX.c. Split them out:

  • gpu_runtime.h / cuda_runtime.c: cudaMalloc, cudaFree, cudaMemcpy, etc.
  • gpu_io.h / gpu_io_cufile.c: cuFileDriverOpen, cuFileHandleRegister,
    cuFileRead/Write with error decoding

configure.ac:

  • --with-cuda=PREFIX with save/restore (was leaking into global flags)
  • --with-gpu-direct-backend=cufile|none replaces --with-gpuDirect
    (old flag still works as alias)
  • --with-cufile=PREFIX

No behaviour change.

cuFile calls were scattered directly in aiori-POSIX.c. Move them into
two layers:

- gpu_runtime.h / cuda_runtime.c: wraps cudaMalloc, cudaFree, etc.
- gpu_io.h / gpu_io_cufile.c: wraps cuFile driver, register, read/write

aiori-POSIX.c now calls only gpu_io_* / gpu_runtime_*.

configure.ac: --with-cuda=PREFIX and --with-cufile=PREFIX with proper
save/restore. --with-gpu-direct-backend=cufile|none replaces
--with-gpuDirect (kept as alias). HAVE_GPU = HAVE_CUDA for now.

No behaviour change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant