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
57 lines
2.7 KiB
LLVM
57 lines
2.7 KiB
LLVM
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_90 | FileCheck %s
|
|
; RUN: %if ptxas-sm_90 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_90 | %ptxas-verify -arch=sm_90 %}
|
|
|
|
;; Test that .loc directives inside inline asm preserve inlined_at context.
|
|
;; When inline asm appears inside an inlined function, the .loc directives
|
|
;; injected for inline asm instructions must include function_name and
|
|
;; inlined_at attributes to avoid stripping the inlining context.
|
|
;;
|
|
;; Simplified from:
|
|
;; __device__ int local_func(int p) {
|
|
;; int dummy;
|
|
;; asm volatile("ld.local.u32 %0, [0];" : "+r"(dummy));
|
|
;; return 2 * p;
|
|
;; }
|
|
;; __global__ void kernel() {
|
|
;; int r = local_func(threadIdx.x);
|
|
;; }
|
|
|
|
target datalayout = "e-p:64:64:64-p3:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-i128:128:128-f32:32:32-f64:64:64-f128:128:128-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64-a:8:8-p6:32:32"
|
|
target triple = "nvptx64-nvidia-cuda"
|
|
|
|
; The inline asm instruction has a DebugLoc at line 4 (in local_func),
|
|
; inlined at line 10 (in kernel). The .loc for the ld.local.u32 inside
|
|
; the inline asm must carry function_name and inlined_at.
|
|
|
|
; CHECK: .loc [[FILEID:[0-9]+]] 4 5, function_name [[FUNCNAME:\$L__info_string[0-9]+]], inlined_at [[FILEID]] 10 3
|
|
; CHECK-NEXT: // begin inline asm
|
|
; CHECK-NEXT: .loc [[FILEID]] 4 5, function_name [[FUNCNAME]], inlined_at [[FILEID]] 10 3
|
|
; CHECK-NEXT: ld.local.u32
|
|
|
|
define void @kernel() #0 !dbg !8 {
|
|
entry:
|
|
%0 = call i32 asm sideeffect "ld.local.u32 $0, [0];", "=r"() #1, !dbg !17
|
|
ret void, !dbg !19
|
|
}
|
|
|
|
attributes #0 = { convergent mustprogress willreturn "nvvm.kernel" "target-cpu"="sm_90" }
|
|
attributes #1 = { convergent nounwind }
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!6}
|
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "lgenfe", isOptimized: false, runtimeVersion: 0, emissionKind: DebugDirectivesOnly)
|
|
!1 = !DIFile(filename: "test.cu", directory: "/test")
|
|
!6 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!8 = distinct !DISubprogram(name: "kernel", linkageName: "_Z6kernelv", scope: !1, file: !1, line: 9, type: !9, scopeLine: 9, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14)
|
|
!9 = !DISubroutineType(types: !10)
|
|
!10 = !{!11}
|
|
!11 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "void")
|
|
!12 = distinct !DISubprogram(name: "local_func", linkageName: "_Z10local_funci", scope: !1, file: !1, line: 2, type: !13, scopeLine: 2, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !14)
|
|
!13 = !DISubroutineType(types: !10)
|
|
!14 = !{}
|
|
!15 = distinct !DILexicalBlock(scope: !12, file: !1, line: 2, column: 30)
|
|
!16 = !DILocation(line: 10, column: 3, scope: !8)
|
|
!17 = !DILocation(line: 4, column: 5, scope: !15, inlinedAt: !16)
|
|
!19 = !DILocation(line: 11, column: 1, scope: !8)
|