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
51 lines
2.7 KiB
Plaintext
51 lines
2.7 KiB
Plaintext
// RUN: fir-opt %s --split-input-file -o /dev/null --mlir-disable-threading \
|
|
// RUN: -pass-pipeline='builtin.module(func.func(test-fir-alias-analysis))' \
|
|
// RUN: 2>&1 | FileCheck -match-full-lines %s
|
|
|
|
fir.global @device_global1 {data_attr = #cuf.cuda<device>} : i32
|
|
fir.global @device_global2 {data_attr = #cuf.cuda<device>} : i32
|
|
fir.global @device_target {data_attr = #cuf.cuda<device>, target} : i32
|
|
fir.global @device_pointer {data_attr = #cuf.cuda<device>} : !fir.box<!fir.ptr<i32>>
|
|
|
|
func.func @test_device_address() {
|
|
%0 = fir.address_of(@device_global1) {test.ptr = "host_ptr1"} : !fir.ref<i32>
|
|
%1 = cuf.device_address @device_global1 {test.ptr = "device_ptr1"} -> !fir.ref<i32>
|
|
%2 = fir.address_of(@device_global2) {test.ptr = "host_ptr2"} : !fir.ref<i32>
|
|
%3 = cuf.device_address @device_global2 {test.ptr = "device_ptr2"} -> !fir.ref<i32>
|
|
%4 = fir.address_of(@device_target) {test.ptr = "host_target"} : !fir.ref<i32>
|
|
%5 = cuf.device_address @device_target {test.ptr = "device_target"} -> !fir.ref<i32>
|
|
%6 = fir.address_of(@device_pointer) {test.ptr = "host_pointer"} : !fir.ref<!fir.box<!fir.ptr<i32>>>
|
|
%7 = cuf.device_address @device_pointer {test.ptr = "device_pointer"} -> !fir.ref<!fir.box<!fir.ptr<i32>>>
|
|
return
|
|
}
|
|
|
|
// CHECK-LABEL: Testing : "test_device_address"
|
|
// CHECK: host_ptr1#0 <-> device_ptr1#0: MustAlias
|
|
// CHECK: host_ptr1#0 <-> host_ptr2#0: NoAlias
|
|
// CHECK: device_ptr1#0 <-> host_ptr2#0: NoAlias
|
|
// CHECK: host_ptr1#0 <-> device_ptr2#0: NoAlias
|
|
// CHECK: device_ptr1#0 <-> device_ptr2#0: NoAlias
|
|
// CHECK: host_ptr2#0 <-> device_ptr2#0: MustAlias
|
|
// CHECK: host_ptr1#0 <-> host_target#0: NoAlias
|
|
// CHECK: device_ptr1#0 <-> host_target#0: NoAlias
|
|
// CHECK: host_ptr2#0 <-> host_target#0: NoAlias
|
|
// CHECK: device_ptr2#0 <-> host_target#0: NoAlias
|
|
// CHECK: host_ptr1#0 <-> device_target#0: NoAlias
|
|
// CHECK: device_ptr1#0 <-> device_target#0: NoAlias
|
|
// CHECK: host_ptr2#0 <-> device_target#0: NoAlias
|
|
// CHECK: device_ptr2#0 <-> device_target#0: NoAlias
|
|
// CHECK: host_target#0 <-> device_target#0: MustAlias
|
|
// CHECK: host_ptr1#0 <-> host_pointer#0: NoAlias
|
|
// CHECK: device_ptr1#0 <-> host_pointer#0: NoAlias
|
|
// CHECK: host_ptr2#0 <-> host_pointer#0: NoAlias
|
|
// CHECK: device_ptr2#0 <-> host_pointer#0: NoAlias
|
|
// CHECK: host_target#0 <-> host_pointer#0: NoAlias
|
|
// CHECK: device_target#0 <-> host_pointer#0: NoAlias
|
|
// CHECK: host_ptr1#0 <-> device_pointer#0: NoAlias
|
|
// CHECK: device_ptr1#0 <-> device_pointer#0: NoAlias
|
|
// CHECK: host_ptr2#0 <-> device_pointer#0: NoAlias
|
|
// CHECK: device_ptr2#0 <-> device_pointer#0: NoAlias
|
|
// CHECK: host_target#0 <-> device_pointer#0: NoAlias
|
|
// CHECK: device_target#0 <-> device_pointer#0: NoAlias
|
|
// CHECK: host_pointer#0 <-> device_pointer#0: MustAlias
|