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
27 lines
1.3 KiB
Fortran
27 lines
1.3 KiB
Fortran
// RUN: fir-opt --split-input-file --cuf-device-global %s | FileCheck %s
|
|
// RUN: fir-opt --split-input-file --cuf-device-global="skip-dead-declares=false" %s | FileCheck --check-prefix=PRESERVE %s
|
|
|
|
module attributes {fir.defaultkind = "a1c4d8i4l4r4", fir.kindmap = "", gpu.container_module} {
|
|
fir.global @_QMiso_c_bindingECc_alert constant : !fir.char<1> {
|
|
%0 = fir.string_lit "\07"(1) : !fir.char<1>
|
|
fir.has_value %0 : !fir.char<1>
|
|
}
|
|
func.func @_QMrhsPkernel(%arg0: !fir.ref<f64>) attributes {cuf.proc_attr = #cuf.cuda_proc<global>} {
|
|
%c1 = arith.constant 1 : index
|
|
%0 = fir.address_of(@_QMiso_c_bindingECc_alert) : !fir.ref<!fir.char<1>>
|
|
%1 = fir.declare %0 typeparams %c1 {fortran_attrs = #fir.var_attrs<parameter>, uniq_name = "_QMiso_c_bindingECc_alert"} : (!fir.ref<!fir.char<1>>, index) -> !fir.ref<!fir.char<1>>
|
|
return
|
|
}
|
|
gpu.module @cuda_device_mod {
|
|
}
|
|
}
|
|
|
|
// With default skip-dead-declares=true, the global should NOT be in gpu.module.
|
|
// CHECK-LABEL: gpu.module @cuda_device_mod
|
|
// CHECK-NOT: fir.global @_QMiso_c_bindingECc_alert
|
|
|
|
// With skip-dead-declares=false (preserveDeclare mode), the global should be copied.
|
|
// PRESERVE: fir.global @_QMiso_c_bindingECc_alert
|
|
// PRESERVE-LABEL: gpu.module @cuda_device_mod
|
|
// PRESERVE: fir.global @_QMiso_c_bindingECc_alert
|