[libcxx-commits] [clang] [lld] [llvm] [libc] [flang] [libcxx] [compiler-rt] [clang-tools-extra] [lldb] [NVPTX] Add support for -march=native in standalone NVPTX (PR #79373)

Artem Belevich via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 25 12:41:27 PST 2024


Artem-B wrote:

> I think the semantics of native on other architectures are clear enough here.

I don't think we have the same idea about that. Let's spell it out, so there's no confusion.

[GCC manual](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-march-16) says:
> Using -march=native enables all instruction subsets supported by the local machine (hence the result might not run on different machines)

The way I read it "all instruction subsets supported by the local machine" would be what all-GPUs strategy would do. The binary is expected to run on all GPU architecture variants available on the machine.

Granted, gcc was not written with GPUs in mind, but it's a good baseline for establishing existing conventions for the meaning of `-march=native`.

https://github.com/llvm/llvm-project/pull/79373


More information about the libcxx-commits mailing list