CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
// Copyright (c) 2026 Advanced Micro Devices, Inc.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
#include <hip/hip_runtime.h>
|
|
|
|
/// Runtime-sized copy kernel used by CDNA4->CDNA3 DBT dispatch tests.
|
|
///
|
|
/// The grid is intentionally allowed to be smaller than N. Each lane walks an
|
|
/// explicit-stride loop, so the host test can dispatch the same kernel object
|
|
/// for many dynamic sizes without recompiling or changing the workgroup shape.
|
|
///
|
|
/// The stride is passed as a normal kernarg instead of reading gridDim.x. These
|
|
/// tests dispatch the code object through raw HSA, not the HIP runtime, and raw
|
|
/// HSA launchers do not provide every HIP implicit runtime field.
|
|
extern "C" __global__
|
|
void dynamic_copy_loop(const unsigned *__restrict__ src, unsigned *__restrict__ dst, unsigned n,
|
|
unsigned workgroup_size, unsigned stride) {
|
|
// The raw HSA dispatch path does not reliably materialize HIP's blockDim.x
|
|
// implicit field, so the host passes the packet workgroup size explicitly.
|
|
const unsigned first = blockIdx.x * workgroup_size + threadIdx.x;
|
|
|
|
for (unsigned i = first; i < n; i += stride)
|
|
dst[i] = src[i];
|
|
}
|