Skip to content

SCALE on AMD is missing the CUDA type cudaSurfaceObject_t #58

Description

@diskdog

Problem

SCALE's AMD target does not declare cudaSurfaceObject_t. Any translation unit that names the type fails to compile. NVIDIA's nvcc accepts it, and SCALE targeting NVIDIA accepts it; only SCALE targeting AMD rejects it. The AMD headers declare the sibling type cudaTextureObject_t (in texture_types.h) but not cudaSurfaceObject_t.

Reproducer

#include <cuda_runtime.h>
void host(cudaSurfaceObject_t s) { cudaSurfaceObject_t t = s; (void)t; }
  • nvcc -arch=sm_75 -std=c++17 -c repro.cu compiles.
  • SCALE to NVIDIA, llvm/bin/nvcc -arch=sm_75 -std=c++17 -c repro.cu, compiles.
  • SCALE to AMD, targets/gfx1100/bin/nvcc -std=c++17 -c repro.cu, fails:
repro.cu:2:11: error: unknown type name 'cudaSurfaceObject_t'; did you mean 'cudaTextureObject_t'?
note: 'cudaTextureObject_t' declared here (redscale_impl/.../texture_types.h:6)

Likely cause

The AMD target ships texture_types.h, which declares cudaTextureObject_t, but has no declaration of cudaSurfaceObject_t. On NVIDIA that type lives in surface_types.h. The AMD headers appear to be missing that declaration.

Toolchain: SCALE unstable-2026.07.08 (clang 20.1.8), AMD target gfx1100.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Missing APIA CUDA API we haven't implemented yet.VerifiedInternal QA verifies the bug reproduces on the current dev build.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions