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
65 lines
1.9 KiB
Plaintext
65 lines
1.9 KiB
Plaintext
// REQUIRES: x86-registered-target
|
|
// REQUIRES: nvptx-registered-target
|
|
|
|
// RUN: %clang_cc1 -x cuda -triple nvptx64-nvidia-cuda- -fcuda-is-device \
|
|
// RUN: -O3 -S %s -o - | FileCheck -check-prefix=PTX %s
|
|
// RUN: %clang_cc1 -x cuda -triple nvptx64-nvidia-cuda- -fcuda-is-device \
|
|
// RUN: -Os -S %s -o - | FileCheck -check-prefix=PTX %s
|
|
#include "Inputs/cuda.h"
|
|
|
|
// PTX-LABEL: .func _Z12copy_genericPvPKv(
|
|
void __device__ copy_generic(void *dest, const void *src) {
|
|
__builtin_memcpy(dest, src, 32);
|
|
// PTX: ld.b8
|
|
// PTX: st.b8
|
|
}
|
|
|
|
// PTX-LABEL: .entry _Z11copy_globalPvS_(
|
|
void __global__ copy_global(void *dest, void * src) {
|
|
__builtin_memcpy(dest, src, 32);
|
|
// PTX: ld.global.b8
|
|
// PTX: st.global.b8
|
|
}
|
|
|
|
struct S {
|
|
int data[8];
|
|
};
|
|
|
|
// PTX-LABEL: .entry _Z20copy_param_to_globalP1SS_(
|
|
void __global__ copy_param_to_global(S *global, S param) {
|
|
__builtin_memcpy(global, ¶m, sizeof(S));
|
|
// PTX: ld.param.b32
|
|
// PTX: st.global.b32
|
|
}
|
|
|
|
// PTX-LABEL: .entry _Z19copy_param_to_localPU3AS51SS_(
|
|
void __global__ copy_param_to_local(__attribute__((address_space(5))) S *local,
|
|
S param) {
|
|
__builtin_memcpy(local, ¶m, sizeof(S));
|
|
// PTX: ld.param.b32
|
|
// PTX: st.local.b32
|
|
}
|
|
|
|
// PTX-LABEL: .func _Z21copy_local_to_genericP1SPU3AS5S_(
|
|
void __device__ copy_local_to_generic(S *generic,
|
|
__attribute__((address_space(5))) S *src) {
|
|
__builtin_memcpy(generic, src, sizeof(S));
|
|
// PTX: ld.local.b32
|
|
// PTX: st.b32
|
|
}
|
|
|
|
__shared__ S shared;
|
|
|
|
// PTX-LABEL: .entry _Z20copy_param_to_shared1S(
|
|
void __global__ copy_param_to_shared( S param) {
|
|
__builtin_memcpy(&shared, ¶m, sizeof(S));
|
|
// PTX: ld.param.b32
|
|
// PTX: st.shared.b32
|
|
}
|
|
|
|
void __device__ copy_shared_to_generic(S *generic) {
|
|
__builtin_memcpy(generic, &shared, sizeof(S));
|
|
// PTX: ld.shared.b32
|
|
// PTX: st.b32
|
|
}
|