[all-commits] [llvm/llvm-project] 6d0583: Enable .ptr .global .align attributes for kernel a...

Lewis Crawford via All-commits all-commits at lists.llvm.org
Fri Nov 15 04:41:15 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d058317e60c25b71df8b8dc45b69e5202362678
      https://github.com/llvm/llvm-project/commit/6d058317e60c25b71df8b8dc45b69e5202362678
  Author: Lewis Crawford <lcrawford at nvidia.com>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
    M llvm/test/CodeGen/NVPTX/i1-param.ll
    A llvm/test/CodeGen/NVPTX/kernel-param-align.ll

  Log Message:
  -----------
  Enable .ptr .global .align attributes for kernel attributes for CUDA (#114874)

Emit .ptr, .address-space, and .align attributes for kernel
args in CUDA (previously handled only for OpenCL).

This allows for more vectorization opportunities if the PTX consumer
is able to know about the pointer alignments.

If no alignment is explicitly specified, .align 1 will be emitted
to match the LLVM IR semantics in this case.

PTX ISA doc -
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#kernel-parameter-attribute-ptr

This is a rework of the original patch proposed in #79646

---------

Co-authored-by: Vandana <vandanak at nvidia.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list