https://github.com/yxsamliu created
https://github.com/llvm/llvm-project/pull/75357
Make changes to clang driver and HIPAMD to allow compile HIP programs to SPIRV
with HIPAMD toolchain.
>From 953685cdefdb12d5e477b107e88a1c3389eb2bb5 Mon Sep 17 00:00:00 2001
From: "Yaxun (Sam) Liu"
Date: Wed,
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Yaxun (Sam) Liu (yxsamliu)
Changes
Make changes to clang driver and HIPAMD to allow compile HIP programs to SPIRV
with HIPAMD toolchain.
---
Full diff: https://github.com/llvm/llvm-project/pull/75357.diff
8 Files Affected:
- (modified)
jhuber6 wrote:
Is generic the best name here? I feel like that's going to be heavily
overloaded.
https://github.com/llvm/llvm-project/pull/75357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
jhuber6 wrote:
> Is generic the best name here? I feel like that's going to be heavily
> overloaded. I'd much prefer a new architecture that just treats "SPIR-V" as a
> single architecture. E.g. `--offload-arch=spirv` or something.
https://github.com/llvm/llvm-project/pull/75357
_
yxsamliu wrote:
> > Is generic the best name here? I feel like that's going to be heavily
> > overloaded. I'd much prefer a new architecture that just treats "SPIR-V" as
> > a single architecture. E.g. `--offload-arch=spirv` or something.
For HIPAMD toolchain, `--offload-arch=generic` and `--o
jhuber6 wrote:
I feel like we should treat `spirv` in the same way we handle stuff like
`sm_90` in the `CudaArch` enum. (We should probably also rename that as it's
used for generic offloading now). OpenMP infers the triple from the arch, so in
the future when OpenMP can handle SPIR-V we can s
AlexVlx wrote:
> > > Is generic the best name here? I feel like that's going to be heavily
> > > overloaded. I'd much prefer a new architecture that just treats "SPIR-V"
> > > as a single architecture. E.g. `--offload-arch=spirv` or something.
>
> For HIPAMD toolchain, `--offload-arch=generic`
@@ -209,6 +210,13 @@ void AMDGCN::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
if (JA.getType() == types::TY_LLVM_BC)
return constructLlvmLinkCommand(C, JA, Inputs, Output, Args);
+ if (Args.getLastArgValue(options::OPT_mcpu_EQ) == "generic") {
+llvm::
jhuber6 wrote:
> Perhaps we should consider prefixing it in some way (e.g. `hip-spirv` or
> `amd-spirv`) that leaves the door open for some special handling (enable a
> particular set of extensions only for amdgpu targeting SPIRV, try to deal
> with missing builtins etc.) / flexibility?
Unsur
@@ -209,6 +210,13 @@ void AMDGCN::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
if (JA.getType() == types::TY_LLVM_BC)
return constructLlvmLinkCommand(C, JA, Inputs, Output, Args);
+ if (Args.getLastArgValue(options::OPT_mcpu_EQ) == "generic") {
+llvm::
yxsamliu wrote:
> > > > Is generic the best name here? I feel like that's going to be heavily
> > > > overloaded. I'd much prefer a new architecture that just treats
> > > > "SPIR-V" as a single architecture. E.g. `--offload-arch=spirv` or
> > > > something.
> >
> >
> > For HIPAMD toolchain,
@@ -209,6 +210,13 @@ void AMDGCN::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
if (JA.getType() == types::TY_LLVM_BC)
return constructLlvmLinkCommand(C, JA, Inputs, Output, Args);
+ if (Args.getLastArgValue(options::OPT_mcpu_EQ) == "generic") {
+llvm::
@@ -209,6 +210,13 @@ void AMDGCN::Linker::ConstructJob(Compilation &C, const
JobAction &JA,
if (JA.getType() == types::TY_LLVM_BC)
return constructLlvmLinkCommand(C, JA, Inputs, Output, Args);
+ if (Args.getLastArgValue(options::OPT_mcpu_EQ) == "generic") {
+llvm::
linehill wrote:
> > Perhaps we should consider prefixing it in some way (e.g. `hip-spirv` or
> > `amd-spirv`) that leaves the door open for some special handling (enable a
> > particular set of extensions only for amdgpu targeting SPIRV, try to deal
> > with missing builtins etc.) / flexibilit
jhuber6 wrote:
>
> How about using `--offload=` which can take a target triple? E.g.
>
> * `--offload=spirv64-amd` or something like that: pick HIPAMD tool chain.
>
> * `--offload=spirv64`: pick HIPSPV tool chain.
>
>
> And also remove this
> [limitation](https://github.com/llvm/llv
15 matches
Mail list logo