Page MenuHomePhabricator
Feed Advanced Search

Thu, Nov 25

linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Disable debug info generation for device code.

Thu, Nov 25, 2:26 AM · Restricted Project

Wed, Nov 24

linjamaki added a comment to D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

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?
Wed, Nov 24, 11:28 PM · Restricted Project

Tue, Nov 23

linjamaki added a comment to D110549: [HIPSPV][1/4] Refactor HIP tool chain.

Thanks for the review.

Tue, Nov 23, 1:32 AM · Restricted Project
linjamaki added a comment to D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Thanks for the review.

Tue, Nov 23, 1:30 AM · Restricted Project
linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Retry push changes.

Tue, Nov 23, 1:28 AM · Restricted Project
linjamaki updated the diff for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

Update a driver test case.

Tue, Nov 23, 1:17 AM · Restricted Project
linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Combine options with append().

Tue, Nov 23, 1:16 AM · Restricted Project

Thu, Nov 18

linjamaki added a comment to D112404: [SPIR-V] Add translator tool.

Thanks for the help!

Thu, Nov 18, 3:13 AM · Restricted Project
linjamaki added inline comments to D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.
Thu, Nov 18, 3:12 AM · Restricted Project
linjamaki updated the diff for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.
  • Adjust --offload description: reflect the current state.
  • Adjust enum range check in IsAMDGpuArch().
  • Make --offload and --offload-arch options mutually exclusive.
Thu, Nov 18, 3:09 AM · Restricted Project

Tue, Nov 16

linjamaki added a comment to D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

Gentle ping.

Tue, Nov 16, 11:44 PM · Restricted Project
linjamaki added a comment to D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Gentle ping.

Tue, Nov 16, 11:42 PM · Restricted Project
linjamaki added a comment to D110549: [HIPSPV][1/4] Refactor HIP tool chain.

Ping?

Tue, Nov 16, 11:39 PM · Restricted Project
linjamaki added a comment to D112404: [SPIR-V] Add translator tool.

Hi @Anastasia and @bader,

Tue, Nov 16, 11:37 PM · Restricted Project
linjamaki updated the diff for D111047: CUDA/HIP: Allow __int128 on the host side.

Rebase.

Tue, Nov 16, 12:12 AM · Restricted Project
linjamaki updated the diff for D110685: [HIPSPV][4/4] Add option to use llc to emit SPIR-V.

Rebase.

Tue, Nov 16, 12:08 AM · Restricted Project
linjamaki updated the diff for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

Rebase.

Tue, Nov 16, 12:07 AM · Restricted Project
linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Rebase.

Tue, Nov 16, 12:07 AM · Restricted Project
linjamaki updated the diff for D110549: [HIPSPV][1/4] Refactor HIP tool chain.

Rebase.

Tue, Nov 16, 12:05 AM · Restricted Project
linjamaki updated the diff for D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels.

Rebase.

Tue, Nov 16, 12:04 AM · Restricted Project

Mon, Nov 15

linjamaki added inline comments to D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.
Mon, Nov 15, 11:14 PM · Restricted Project, Restricted Project
linjamaki updated the diff for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Rebase, add asserts and move address space map reset for HIP from SPIRVTargetInfo to BaseSPIRTargetInfo

Mon, Nov 15, 11:09 PM · Restricted Project, Restricted Project
linjamaki updated the diff for D112404: [SPIR-V] Add translator tool.

Rebase.

Mon, Nov 15, 11:04 PM · Restricted Project

Tue, Nov 2

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.

Tue, Nov 2, 2:13 AM · Restricted Project, Restricted Project

Oct 28 2021

linjamaki updated the diff for D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete).

Rebase on updated llvm-spirv tool (D112404).

Oct 28 2021, 6:27 AM · Restricted Project
linjamaki added a comment to D112404: [SPIR-V] Add translator tool.

Thanks for the review.

Oct 28 2021, 5:45 AM · Restricted Project
linjamaki updated the diff for D112404: [SPIR-V] Add translator tool.

Rename SPIRV::Translator's tool names as suggested by bader.

Oct 28 2021, 5:40 AM · Restricted Project

Oct 27 2021

linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Update for changes in D112404.

Oct 27 2021, 11:50 PM · Restricted Project
linjamaki updated the diff for D112404: [SPIR-V] Add translator tool.

Remove --spirv-ext and --spirv-max-version.

Oct 27 2021, 11:48 PM · Restricted Project
linjamaki added a comment to D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete).

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
linjamaki added inline comments to D112404: [SPIR-V] Add translator tool.
Oct 27 2021, 11:39 PM · Restricted Project

Oct 26 2021

linjamaki added reviewers for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP: tra, rsmith.
Oct 26 2021, 3:07 AM · Restricted Project
linjamaki updated the diff for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

Improve --offload option description.

Oct 26 2021, 3:02 AM · Restricted Project
linjamaki added reviewers for D110618: [HIPSPV][2/4] Add HIPSPV tool chain: tra, rsmith.
Oct 26 2021, 2:11 AM · Restricted Project
linjamaki added a comment to D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Gentle ping. Is anything needed to be addressed to get this patch accepted?

Oct 26 2021, 2:11 AM · Restricted Project
linjamaki added reviewers for D110549: [HIPSPV][1/4] Refactor HIP tool chain: tra, rsmith.
Oct 26 2021, 2:09 AM · Restricted Project
linjamaki added a comment to D110549: [HIPSPV][1/4] Refactor HIP tool chain.

Gentle ping.

Oct 26 2021, 2:09 AM · Restricted Project
linjamaki added a comment to D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Gentle ping. Is anything needed to be addressed to get this patch accepted?

Oct 26 2021, 2:07 AM · Restricted Project, Restricted Project
linjamaki added a comment to D111047: CUDA/HIP: Allow __int128 on the host side.

Thanks for the review. Updated the patch with the style suggestions.

Oct 26 2021, 2:02 AM · Restricted Project
linjamaki updated the diff for D111047: CUDA/HIP: Allow __int128 on the host side.

Rephrase expressions.

Oct 26 2021, 1:56 AM · Restricted Project

Oct 25 2021

linjamaki updated subscribers of D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete).
Oct 25 2021, 12:25 AM · Restricted Project
linjamaki updated subscribers of D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete).
Oct 25 2021, 12:24 AM · Restricted Project
linjamaki published D112410: [SPIR-V] Add a tool chain for SPIR-V (incomplete) for review.
Oct 25 2021, 12:23 AM · Restricted Project
linjamaki added reviewers for D112404: [SPIR-V] Add translator tool: Anastasia, bader.
Oct 25 2021, 12:11 AM · Restricted Project
linjamaki updated the diff for D111047: CUDA/HIP: Allow __int128 on the host side.

Rebase.

Oct 25 2021, 12:07 AM · Restricted Project
linjamaki updated the diff for D110685: [HIPSPV][4/4] Add option to use llc to emit SPIR-V.

Rebase.

Oct 25 2021, 12:06 AM · Restricted Project
linjamaki updated the diff for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

Rebase.

Oct 25 2021, 12:05 AM · Restricted Project
linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Rebase and use SPIRV::constructTranslateCommand() to contruct
the LLVM-SPIR-V translation command.

Oct 25 2021, 12:03 AM · Restricted Project

Oct 24 2021

linjamaki updated the diff for D110549: [HIPSPV][1/4] Refactor HIP tool chain.

Rebase.

Oct 24 2021, 11:59 PM · Restricted Project
linjamaki updated the diff for D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels.

Rebase.

Oct 24 2021, 11:57 PM · Restricted Project
linjamaki updated the diff for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Rebase.

Oct 24 2021, 11:56 PM · Restricted Project, Restricted Project
linjamaki requested review of D112404: [SPIR-V] Add translator tool.
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 24 2021, 11:50 PM · Restricted Project, Restricted Project

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 15 2021, 1:22 AM · Restricted Project, Restricted Project

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 13 2021, 10:54 PM · Restricted Project, Restricted Project

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 needed

I think this was proposed in RFC. @linjamaki, am I right?

Oct 8 2021, 6:16 AM · Restricted Project, Restricted Project

Oct 6 2021

linjamaki added a comment to D110685: [HIPSPV][4/4] Add option to use llc to emit SPIR-V.

Ok, is the idea to deprecate this flag once we switch to llc by default then?

Oct 6 2021, 5:23 AM · Restricted Project

Oct 4 2021

linjamaki published D111047: CUDA/HIP: Allow __int128 on the host side for review.
Oct 4 2021, 3:51 AM · Restricted Project
linjamaki published D110685: [HIPSPV][4/4] Add option to use llc to emit SPIR-V for review.
Oct 4 2021, 3:22 AM · Restricted Project
linjamaki updated the diff for D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

Repurpose 'Generic' CudaArch, Use getAllArgValues() for reading
--offload values and fix a enum range.

Oct 4 2021, 2:32 AM · Restricted Project
linjamaki updated the diff for D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

Update option description.

Oct 4 2021, 1:52 AM · Restricted Project
linjamaki added a comment to D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP.

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
linjamaki added a comment to D110618: [HIPSPV][2/4] Add HIPSPV tool chain.

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

linjamaki published D110622: [HIPSPV][3/4] Enable SPIR-V emission for HIP for review.
Sep 29 2021, 1:15 AM · Restricted Project

Sep 28 2021

linjamaki updated subscribers of D110618: [HIPSPV][2/4] Add HIPSPV tool chain.
Sep 28 2021, 5:21 AM · Restricted Project
linjamaki added a reviewer for D110618: [HIPSPV][2/4] Add HIPSPV tool chain: yaxunl.
Sep 28 2021, 5:20 AM · Restricted Project
linjamaki published D110618: [HIPSPV][2/4] Add HIPSPV tool chain for review.
Sep 28 2021, 5:20 AM · Restricted Project
linjamaki published D110549: [HIPSPV][1/4] Refactor HIP tool chain for review.
Sep 28 2021, 1:29 AM · Restricted Project

Sep 27 2021

linjamaki updated the diff for D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels.

Put HIPSPV logic into new SPIRV{ABI,TargetCodeGen}Info subclassed from
CommonSPIR{ABI,TargetCodeGen}Info.

Sep 27 2021, 6:04 AM · Restricted Project
linjamaki updated the diff for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Rebase.

Sep 27 2021, 5:39 AM · Restricted Project, Restricted Project
linjamaki updated the diff for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Rebase.

Sep 27 2021, 5:38 AM · Restricted Project, Restricted Project
linjamaki updated the diff for D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.

Rename SPIRABIInfo -> CommonSPIRABIInfo and SPIRTargetCodeGenInfo -> CommonSPIRTargetCodeGenInfo

Sep 27 2021, 5:33 AM · Restricted Project, Restricted Project

Sep 23 2021

linjamaki added inline comments to D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels.
Sep 23 2021, 2:43 AM · Restricted Project

Sep 21 2021

linjamaki added inline comments to D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels.
Sep 21 2021, 10:44 PM · Restricted Project

Sep 20 2021

linjamaki published D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels for review.
Sep 20 2021, 2:20 AM · Restricted Project
linjamaki updated the diff for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Rebase.

Sep 20 2021, 12:13 AM · Restricted Project, Restricted Project

Sep 16 2021

linjamaki added a comment to D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.

Hi @Anastasia, could you submit this patch for me (I don’t have commit access)? Thanks.

Sep 16 2021, 2:04 AM · Restricted Project, Restricted Project

Sep 15 2021

linjamaki added inline comments to D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.
Sep 15 2021, 10:20 PM · Restricted Project, Restricted Project

Sep 13 2021

linjamaki updated the diff for D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.

Add -verify and expected-no-diagnostics to a SPIR-V test.

Sep 13 2021, 10:49 PM · Restricted Project, Restricted Project
linjamaki added inline comments to D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.
Sep 13 2021, 4:40 AM · Restricted Project, Restricted Project

Sep 10 2021

linjamaki updated the summary of D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.
Sep 10 2021, 4:45 AM · Restricted Project, Restricted Project
linjamaki updated the diff for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Enable HIP-to-SPIR-V address space mapping only for SPIR-V targets.

Sep 10 2021, 4:43 AM · Restricted Project, Restricted Project
linjamaki updated the diff for D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.

Merge two tests together.

Sep 10 2021, 12:35 AM · Restricted Project, Restricted Project
linjamaki added inline comments to D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Sep 10 2021, 12:11 AM · Restricted Project, Restricted Project

Sep 3 2021

linjamaki updated the summary of D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Sep 3 2021, 4:25 AM · Restricted Project, Restricted Project
linjamaki updated the summary of D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Sep 3 2021, 4:24 AM · Restricted Project, Restricted Project
linjamaki updated the diff for D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.

Remove unused triple, reduce tests and fix a lint error. Other lint errors seems to be out of my control.

Sep 3 2021, 4:23 AM · Restricted Project, Restricted Project

Sep 2 2021

linjamaki requested review of D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info.
Sep 2 2021, 3:21 AM · Restricted Project, Restricted Project

Aug 25 2021

linjamaki planned changes to D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.

Thanks. I will make a patch for adding spirv triples and new target info and update this.

Aug 25 2021, 11:39 PM · Restricted Project, Restricted Project
linjamaki added a comment to D108367: [NFC] computeSPIRKernelABIInfo(): use SPIRABInfo.

Thanks for the review.

Aug 25 2021, 11:06 PM · Restricted Project

Aug 24 2021

linjamaki added reviewers for D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping: Anastasia, bader.
Aug 24 2021, 11:36 PM · Restricted Project, Restricted Project
linjamaki updated the summary of D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.
Aug 24 2021, 3:38 AM · Restricted Project, Restricted Project
linjamaki requested review of D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping.
Aug 24 2021, 3:35 AM · Restricted Project, Restricted Project

Aug 19 2021

linjamaki added a reviewer for D108367: [NFC] computeSPIRKernelABIInfo(): use SPIRABInfo: Anastasia.
Aug 19 2021, 5:32 AM · Restricted Project
linjamaki requested review of D108367: [NFC] computeSPIRKernelABIInfo(): use SPIRABInfo.
Aug 19 2021, 5:16 AM · Restricted Project