In D130766#3687240, @Anastasia wrote:CC to @linjamaki in case there is anything else/different needed for HIP.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Jul 31 2022
Jul 31 2022
Jul 31 2022, 11:01 PM · Restricted Project
May 17 2022
May 17 2022
linjamaki added a comment to D125679: [Clang] Added options for integrated backend only used for SPIR-V for now.
From my point of view this patch LGTM.
May 9 2022
May 9 2022
Sounds good to me. I’ll make a new patch when there is a need for it and close this one.
linjamaki added inline comments to D124776: [SPIR-V] Allow setting SPIR-V version via target triple.
Feb 3 2022
Feb 3 2022
Thanks for the review, @yaxunl. Could you push this to the LLVM? And to the LLVM 14 release branch too, if possible?
Feb 3 2022, 11:46 PM · Restricted Project
Feb 2 2022
Feb 2 2022
Feb 2 2022, 11:57 PM · Restricted Project
Jan 26 2022
Jan 26 2022
In D117137#3269365, @yaxunl wrote:Does that mean only "spirv{64}-unknown-unknown" is acceptable, or "spirv{64}-amd-unknown-unknown" is also acceptable?
Jan 26 2022, 2:42 AM · Restricted Project
Jan 25 2022
Jan 25 2022
SPIR-V target requires that the OS and the environment type is unknown (see TargetInfo::AllocateTarget and BaseSPIRTargetInfo). The clang would fail to create a SPIR-V target if there is an OS or environment component in the target string known by the Triple. This could lead to a misleading error message.
Jan 25 2022, 12:59 AM · Restricted Project
Dec 21 2021
Dec 21 2021
This patch should be ready to land. @tra, could you please commit it to the LLVM for us? Thanks.
Dec 21 2021, 5:28 AM · Restricted Project
Rebase.
Dec 21 2021, 4:35 AM · Restricted Project
Thanks, @yaxunl.
Dec 21 2021, 1:25 AM · Restricted Project
Dec 16 2021
Dec 16 2021
Assuming that this patch is ready to land. @tra or @yaxunl, could you please commit this patch to the LLVM for us? Thanks.
Dec 16 2021, 11:41 PM · Restricted Project
If I understand correctly, the default optimization level is -O2 for the OpenCL and OpenCL++ language mode (according to CompilerInvocation.cpp:getOptimizationLevel()). Since higher than -O0 may not work with the translator, should the SPIR-V tool chain override this default and set it to -O0 (unless a user passes some -O option)?
Dec 16 2021, 5:25 AM · Restricted Project
Rebase.
Dec 16 2021, 1:49 AM · Restricted Project
Dec 14 2021
Dec 14 2021
Thanks, @tra.
Dec 14 2021, 11:51 PM · Restricted Project
This patch should be ready to land. @tra, could you please commit this to the LLVM for us. Thanks.
Dec 14 2021, 5:23 AM · Restricted Project
Rebase.
Dec 14 2021, 4:28 AM · Restricted Project
Dec 13 2021
Dec 13 2021
Thanks, @yaxunl.
Dec 13 2021, 10:26 PM · Restricted Project
D109818 includes the change in this patch.
Dec 13 2021, 6:01 AM · Restricted Project
Dec 10 2021
Dec 10 2021
Assuming this patch is ready to land. @yaxunl, Could you please commit this patch to the LLVM for us. Thanks.
Dec 10 2021, 6:53 AM · Restricted Project
Rebase.
Dec 10 2021, 6:13 AM · Restricted Project
Dec 8 2021
Dec 8 2021
Thanks, @bader.
Dec 8 2021, 10:46 PM · Restricted Project
Thanks for the feedback. The --offload is meant to support multiple targets but right now it is restricted to one at most. The limitation comes from the HIPActionBuilder and CudaActionBuilderBase which currently expects a single target triple and toolchain for all offload devices. To relax the --offload target count cap we would need to adjust the action builders to support multiple target triples and create a separate toolchain for each (unique) target triple.
Dec 8 2021, 1:12 AM · Restricted Project
- Add comments to clarify the limitation of the --offload option to one target.
Dec 8 2021, 1:09 AM · Restricted Project
Rebase.
Dec 8 2021, 12:10 AM · Restricted Project
Rebase.
Dec 8 2021, 12:09 AM · Restricted Project
Cherry-picking should work now, @bader.
Dec 8 2021, 12:07 AM · Restricted Project
Rebase.
Dec 8 2021, 12:03 AM · Restricted Project
Dec 3 2021
Dec 3 2021
The patch is ready to land. @Anastasia, @bader, could you commit this patch to the LLVM for us? Thanks.
Dec 3 2021, 4:17 AM · Restricted Project
Thanks, @Anastasia.
Dec 1 2021
Dec 1 2021
@tra, gentle ping.
Dec 1 2021, 4:11 AM · Restricted Project
@Anastasia, Could you please commit this patch to the LLVM for us? Thanks.
Nov 25 2021
Nov 25 2021
Disable debug info generation for device code.
Nov 25 2021, 2:26 AM · Restricted Project
Nov 24 2021
Nov 24 2021
In D110618#3148501, @Anastasia wrote:Could you please clarify the interface to SPIRV-LLVM-Translator tool, specifically:
- Does clang lookup the path to the translator or assume any default path?
Nov 24 2021, 11:28 PM · Restricted Project
Nov 23 2021
Nov 23 2021
Thanks for the review.
Nov 23 2021, 1:32 AM · Restricted Project
Thanks for the review.
Nov 23 2021, 1:30 AM · Restricted Project
Retry push changes.
Nov 23 2021, 1:28 AM · Restricted Project
Update a driver test case.
Nov 23 2021, 1:17 AM · Restricted Project
Combine options with append().
Nov 23 2021, 1:16 AM · Restricted Project
Nov 18 2021
Nov 18 2021
Thanks for the help!
Nov 18 2021, 3:13 AM · Restricted Project
Nov 18 2021, 3:12 AM · Restricted Project
- Adjust --offload description: reflect the current state.
- Adjust enum range check in IsAMDGpuArch().
- Make --offload and --offload-arch options mutually exclusive.
Nov 18 2021, 3:09 AM · Restricted Project
Nov 16 2021
Nov 16 2021
Gentle ping.
Nov 16 2021, 11:44 PM · Restricted Project
Gentle ping.
Nov 16 2021, 11:42 PM · Restricted Project
Ping?
Nov 16 2021, 11:39 PM · Restricted Project
Hi @Anastasia and @bader,
Nov 16 2021, 11:37 PM · Restricted Project
Rebase.
Nov 16 2021, 12:12 AM · Restricted Project
Rebase.
Rebase.
Nov 16 2021, 12:07 AM · Restricted Project
Rebase.
Nov 16 2021, 12:07 AM · Restricted Project
Rebase.
Nov 16 2021, 12:05 AM · Restricted Project
Rebase.
Nov 16 2021, 12:04 AM · Restricted Project
Nov 15 2021
Nov 15 2021
Rebase, add asserts and move address space map reset for HIP from SPIRVTargetInfo to BaseSPIRTargetInfo
Rebase.
Nov 15 2021, 11:04 PM · Restricted Project
Nov 2 2021
Nov 2 2021
linjamaki added a comment to D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Is this patch ready to land on the LLVM? We do not have commit rights, so can you please commit this patch for us? Thanks.
Oct 28 2021
Oct 28 2021
Rebase on updated llvm-spirv tool (D112404).
Oct 28 2021, 6:27 AM · Restricted Project
Thanks for the review.
Oct 28 2021, 5:45 AM · Restricted Project
Rename SPIRV::Translator's tool names as suggested by bader.
Oct 28 2021, 5:40 AM · Restricted Project
Oct 27 2021
Oct 27 2021
Update for changes in D112404.
Oct 27 2021, 11:50 PM · Restricted Project
Remove --spirv-ext and --spirv-max-version.
Oct 27 2021, 11:48 PM · Restricted Project
Do I read it correctly that you would have no objections for others to rework this patch if needed? :)
Oct 27 2021, 11:44 PM · Restricted Project
Oct 27 2021, 11:39 PM · Restricted Project
Oct 26 2021
Oct 26 2021
Oct 26 2021, 3:07 AM · Restricted Project
Improve --offload option description.
Oct 26 2021, 3:02 AM · Restricted Project
Oct 26 2021, 2:11 AM · Restricted Project
Gentle ping. Is anything needed to be addressed to get this patch accepted?
Oct 26 2021, 2:11 AM · Restricted Project
Oct 26 2021, 2:09 AM · Restricted Project
Gentle ping.
Oct 26 2021, 2:09 AM · Restricted Project
Gentle ping. Is anything needed to be addressed to get this patch accepted?
Thanks for the review. Updated the patch with the style suggestions.
Oct 26 2021, 2:02 AM · Restricted Project
Rephrase expressions.
Oct 26 2021, 1:56 AM · Restricted Project
Oct 25 2021
Oct 25 2021
Oct 25 2021, 12:25 AM · Restricted Project
Oct 25 2021, 12:24 AM · Restricted Project
Oct 25 2021, 12:23 AM · Restricted Project
Oct 25 2021, 12:11 AM · Restricted Project
Rebase.
Oct 25 2021, 12:07 AM · Restricted Project
Rebase.
Rebase.
Oct 25 2021, 12:05 AM · Restricted Project
Rebase and use SPIRV::constructTranslateCommand() to contruct
the LLVM-SPIR-V translation command.
Oct 25 2021, 12:03 AM · Restricted Project
Oct 24 2021
Oct 24 2021
Rebase.
Oct 24 2021, 11:59 PM · Restricted Project
Rebase.
Oct 24 2021, 11:57 PM · Restricted Project
Rebase.
Oct 24 2021, 11:52 PM · Restricted Project
linjamaki updated the diff for D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Rebase.
Oct 15 2021
Oct 15 2021
linjamaki updated subscribers of D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Thanks for the clarifications. So it seems that you are not expecting that the device target triple is being explicitly passed anywhere then and that means you pass the device triple implicitly?
We are meaning to use the --offload as a way to pass device target triple explicitly.
Although your --offload option does seem conceptually like a device target triple, so I wonder if better naming for it would be --offload-target? Would it work for you if we introduce SPIR-V triple explicitly and you use it as a device offload triple?
To introduce a way to pass a device target triple in HIP compilation, we decided it to be aligned with the envisioned “Unified Offload Option” feature [1] to avoid overlap with similar concept. The design of the feature is pending. AFAIK, @yaxunl, who is working on it, hasn't got time yet to continue the work. In D110622 we propose adding the --offload option as partial implementation and there is a bit of discussion about the design too.
It would probably makes sense to use the same triple to targeting SPIR-V generation by everyone?
Yes, it makes sense.
However I appreciate that OpenCL flow would be somewhat different since it doesn't have a split into host and device but only contains device compilation phase...
The split is specific to offloading languages (such as CUDA, HIP and OpenMP) whose compilation flow is different from the traditional compilation flow. The traditional compilation flow used for non-offloading languages naturally does not have the host/device compilation split.
Oct 13 2021
Oct 13 2021
linjamaki added a comment to D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Can you explain what does this mean
It was trying to clarify a potential misunderstanding of how programs are compiled when HIPSPV is targeted: For HIPSPV, the SPIR-V code generation is done by the clang driver. When we compile HIP programs for HIPCL or the HIPLZ runtime, we issue a single clang command such as this:
clang++ --offload=spirv64 foo.hip -l<hip-runtime> -o foo
With this, the clang driver compiles the device side code to a SPIR-V binary and then compiles host side code, and embeds the SPIR-V binary to the host (fat) binary.
Oct 8 2021
Oct 8 2021
linjamaki added a comment to D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
> What I have in mind is to continue using SPIR target for now (until SPIR-V back-end is added).
For instance, SYCL compiler emits code for SPIR target and code format is configured via flag.
-emit-llvm changes output file format for regular C++ compilation flow:
clang++ a.cpp -c -o a.o # object format by default clang++ a.cpp -c -emit-llvm -o a.bc # LLVM IR format with `-emit-llvm`Similar approach for HIP device compilation flow:
clang++ -target spir -x hip a.cpp -cuda-device-only -o a.spv # SPIR-V format by default clang++ -target spir -x hip a.cpp -cuda-device-only -emit-llvm -o a.bc # LLVM IR (aka SPIR) format with `-emit-llvm` if neededI think this was proposed in RFC. @linjamaki, am I right?
Oct 6 2021
Oct 6 2021
In D110685#3044993, @Anastasia wrote:Ok, is the idea to deprecate this flag once we switch to llc by default then?
Oct 4 2021
Oct 4 2021
Oct 4 2021, 3:51 AM · Restricted Project
Repurpose 'Generic' CudaArch, Use getAllArgValues() for reading
--offload values and fix a enum range.
Oct 4 2021, 2:32 AM · Restricted Project
Update option description.
Oct 4 2021, 1:52 AM · Restricted Project
In D110622#3030792, @tra wrote:A Cuda GPU architecture ‘generic’ is added. The name is picked from the LLVM SPIR-V Backend. In the HIPSPV code path the architecture name is inserted to the bundle entry ID as target ID. Target ID is expected to be always present so a component in the target triple is not mistaken as target ID.
How generic is 'generic'? If I understand the statement above correctly, it should probably reflect that it's specific to spir-v.
If it's the only possible spir-v variant, then calling it`spir-v` might be more meaningful.
If we expect to see other spir-v variants in the future it would allow us to clearly differentiate between them later.
E.g. --offload=spirv-a,spirv-b. It would be rather odd if we had to use --offload=generic, spirv-b.
Oct 4 2021, 1:24 AM · Restricted Project
In D110618#3032899, @Anastasia wrote:Considering that SPIR-V translation step is also required for other languages would it make sense to add llvm-spirv as a common tool like for example C/C++ linkers and create a bit of common infrastructure? It might be something we can do as a separate step too but it would be good to make sure nothing prevents us from doing this in the future... We should probably also think about the command line interface unification as it probably doesn't make sense for every language to add their own flags for locating SPIR-V translator.
I don’t think it would work out well. llvm-spirv (or other tool relying on LLVM bitcode input) and LLVM may have version differences that cause obscure error cases - like newer LLVM producing bitcode with new features the tools are not expecting and ready for them. The usage of llvm-spirv tool in the HIPSPV tool chain is not intended to be a longer term solution due to this shortcoming.
Oct 4 2021, 1:11 AM · Restricted Project
Sep 29 2021
Sep 29 2021
Sep 29 2021, 1:15 AM · Restricted Project
Sep 28 2021
Sep 28 2021
Sep 28 2021, 5:21 AM · Restricted Project
Sep 28 2021, 5:20 AM · Restricted Project
Sep 28 2021, 5:20 AM · Restricted Project
Sep 28 2021, 1:29 AM · Restricted Project