[all-commits] [llvm/llvm-project] 0ae9da: [OpenACC][CIR] Lower 'num_workers' for parallel/ke...

Erich Keane via All-commits all-commits at lists.llvm.org
Mon Apr 21 11:51:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ae9dac262afccea1e1a2e02520f737ab38b286c
      https://github.com/llvm/llvm-project/commit/0ae9dac262afccea1e1a2e02520f737ab38b286c
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2025-04-21 (Mon, 21 Apr 2025)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenStmtOpenACC.cpp
    M clang/test/CIR/CodeGenOpenACC/kernels.c
    M clang/test/CIR/CodeGenOpenACC/parallel.c

  Log Message:
  -----------
  [OpenACC][CIR] Lower 'num_workers' for parallel/kernels (#136578)

This patch also includes the first one to handle 'device_type' properly,
which is where most of the 'challenge' here comes from.

>From the best I can tell: we must keep two lists of the same size, 1 of
all of the 'num_workers' items, and 1 of the 'device_type' value for
that 'num_workers'. Additionally, the 'device_type' list can only handle
single 'device_type' values, so we have to duplicate the 'num_workers'
items in cases where there are multiple applicable 'device_type' values.

This patch accomplishes this by keeping the two in sync, and saving the
current 'device_type' in the visitor.



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