[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread via cfe-commits
github-actions[bot] wrote: @oraluben Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/6] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Thanks, I'll merge it once it passes CI. https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/5] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Joseph Huber via cfe-commits
@@ -750,10 +750,11 @@ NVPTXToolChain::TranslateArgs(const llvm::opt::DerivedArgList , if (!llvm::is_contained(*DAL, A)) DAL->append(A); - // TODO: We should accept 'generic' as a valid architecture. if (!DAL->hasArg(options::OPT_march_EQ) && OffloadKind !=

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. LG, thanks for the patch. https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben edited https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/4] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Joseph Huber via cfe-commits
jhuber6 wrote: FWIW I think you can kind of do this with `-march=sm_52 -march=` to just set it to empty. https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/3] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/3] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben converted_to_draft https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/3] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
@@ -85,6 +90,6 @@ // MISSING: error: Must pass in an explicit nvptx64 gpu architecture to 'nvlink' // RUN: %clang -target nvptx64-nvidia-cuda -flto -c %s -### 2>&1 \ -// RUN: | FileCheck -check-prefix=GENERIC %s +// RUN: | FileCheck -check-prefix=COMPILE %s

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Joseph Huber via cfe-commits
@@ -85,6 +90,6 @@ // MISSING: error: Must pass in an explicit nvptx64 gpu architecture to 'nvlink' // RUN: %clang -target nvptx64-nvidia-cuda -flto -c %s -### 2>&1 \ -// RUN: | FileCheck -check-prefix=GENERIC %s +// RUN: | FileCheck -check-prefix=COMPILE %s

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 requested changes to this pull request. Thanks for looking at this. When the user compiles with `-march=xyz` it introduces a lot of subtarget specific metadata intro the output IR. The purpose of the original patch was to keep `-target-cpu` unset in cases where

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/2] [NVPTX] Add `-march=general` option to mirror default

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
oraluben wrote: @jhuber6 @Artem-B You might want to check if this LGTY :) https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 34ba90745fa55777436a2429a51a3799c83c6d4c 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 --

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yichen Yan (oraluben) Changes This PR adds `-march=generic` support for the NVPTX backend. This fulfills a TODO introduced in #79873. With this PR, users can explicitly request the default CUDA architecture. This default is regularly

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben created https://github.com/llvm/llvm-project/pull/85222 This PR adds `-march=generic` support for the NVPTX backend. This fulfills a TODO introduced in #79873. With this PR, users can explicitly request the default CUDA architecture. This default is regularly