feat/cuda: I1 - CUDA backend skeleton (probe+create/free real, 100 op stubs) - #20
Open
magiodev wants to merge 6 commits into
Open
feat/cuda: I1 - CUDA backend skeleton (probe+create/free real, 100 op stubs)#20magiodev wants to merge 6 commits into
magiodev wants to merge 6 commits into
Conversation
…l, 100 op stubs) - Add h3_cuda.cu: implements the existing plain-C h3_gpu.h API against CUDA/cuBLAS. h3_cuda_probe + h3_gpu_create/free/error real; all compute ops are stubs returning 'not yet implemented'. Metal backend (h3_gpu.m/h3_shaders.metal) preserved untouched. - Add h3_cuda.h (probe decl); h3.c probes via H3_CUDA guard. - Add h3_tokenizer.c C stub (Linux has no Foundation; Metal keeps h3_tokenizer.m). - h3_host.c: vImage high-quality scale guarded, portable bilinear fallback for CUDA build. - h3.c/h3_cli.c/h3_ffmpeg.c: Linux portability guards (st_mtimespec->st_mtim, arc4random_buf->getrandom, SSIZE_MAX define). - Makefile: cuda-spark/cuda-generic/cuda targets (nvcc + cuBLAS, .cuda.o objects, CUDA_ARCH=sm_121 for DGX Spark GB10), mirroring ds4's pattern.
…CK_MONOTONIC/strdup)
…urns cast to exact type
…removed prop.unifiedMemory)
…h in h3_cuda.cu nvcc compiles .cu as C++; without C linkage the GPU API symbols were mangled and the host C objects could not link. extern "C" guards are compile-time only and inert for the Metal build (.c/.m never define __cplusplus).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PR 1/2 of the h3.c CUDA port (ds4-style, Metal preserved).
I1 scaffold: h3_cuda.cu (real h3_cuda_probe + create/free/error, compute ops stubbed), cuda-spark/cuda-generic Makefile targets (nvcc+cuBLAS, sm_121 for GB10), Linux host-deps (h3_tokenizer.c stub, vImage->bilinear, POSIX guards), extern "C" linkage fix. Build-gated on DGX Spark: make cuda-spark compiles clean, h3 binary runs. Metal files untouched.