Page MenuHomePhabricator
Feed Advanced Search

Yesterday

yaxunl added inline comments to D82087: AMDGPU/clang: Add builtins for llvm.amdgcn.ballot.
Thu, Jul 9, 5:45 AM

Wed, Jul 8

yaxunl committed rG1eaad01046c8: [CUDA][HIP] Let lambda be host device by default (authored by yaxunl).
[CUDA][HIP] Let lambda be host device by default
Wed, Jul 8, 10:11 AM
yaxunl closed D78655: [CUDA][HIP] Let lambda be host device by default.
Wed, Jul 8, 10:11 AM · Restricted Project
yaxunl added inline comments to D78655: [CUDA][HIP] Let lambda be host device by default.
Wed, Jul 8, 7:08 AM · Restricted Project
yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

revised by Artem's comments

Wed, Jul 8, 7:07 AM · Restricted Project

Tue, Jul 7

yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

refactor CUDACheckLambdaCapture and add comments

Tue, Jul 7, 2:35 PM · Restricted Project

Mon, Jul 6

yaxunl added inline comments to D82930: [HIP] Fix rocm detection.
Mon, Jul 6, 2:39 PM
yaxunl added inline comments to D82930: [HIP] Fix rocm detection.
Mon, Jul 6, 2:00 PM
yaxunl accepted D83145: [HIP] Use default triple in llvm-mc for system ld.

LGTM. Thanks.

Mon, Jul 6, 1:02 PM · Restricted Project
yaxunl updated the diff for D80858: [CUDA][HIP] Support accessing static device variable in host code.

revised by John's comments.

Mon, Jul 6, 6:02 AM
yaxunl added inline comments to D80858: [CUDA][HIP] Support accessing static device variable in host code.
Mon, Jul 6, 5:50 AM

Thu, Jul 2

yaxunl added inline comments to D82930: [HIP] Fix rocm detection.
Thu, Jul 2, 4:48 AM

Wed, Jul 1

yaxunl added inline comments to D82930: [HIP] Fix rocm detection.
Wed, Jul 1, 9:42 AM
yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

revised by Artem's and Paul's comments

Wed, Jul 1, 5:54 AM · Restricted Project
yaxunl added inline comments to D78655: [CUDA][HIP] Let lambda be host device by default.
Wed, Jul 1, 5:54 AM · Restricted Project

Tue, Jun 30

yaxunl created D82930: [HIP] Fix rocm detection.
Tue, Jun 30, 9:39 PM
yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

Added diagnostics for capturing host variables on device lambda and made lambda host device by default.

Tue, Jun 30, 1:35 PM · Restricted Project

Fri, Jun 26

yaxunl added a comment to D82650: [HIP] Set default FP_CONTRACT to ON.

I think the point of -ffp-contract=fast is that it allows emitting fma across statements if there are such opportunities whereas -ffp-contract=on only allows fma in one statement

Fri, Jun 26, 6:30 AM · Restricted Project
yaxunl added a reviewer for D82650: [HIP] Set default FP_CONTRACT to ON: tra.
Fri, Jun 26, 6:30 AM · Restricted Project
yaxunl added a comment to D81869: Modify FPFeatures to use delta not absolute settings to solve PCH compatibility problems.

Would you please add the following lit test

Fri, Jun 26, 5:56 AM · Restricted Project, Restricted Project

Thu, Jun 25

yaxunl committed rG8013ce449022: [HIP] Add missing options for lto (authored by yaxunl).
[HIP] Add missing options for lto
Thu, Jun 25, 9:50 PM
yaxunl closed D82506: [HIP] Add missing options for lto.
Thu, Jun 25, 9:49 PM · Restricted Project
yaxunl committed rGed398c3ca404: [NFC] Extract unifyTargetFeatures (authored by yaxunl).
[NFC] Extract unifyTargetFeatures
Thu, Jun 25, 8:45 PM
yaxunl closed D82579: [NFC] Extract unifyTargetFeatures.
Thu, Jun 25, 8:45 PM · Restricted Project
yaxunl added inline comments to D82579: [NFC] Extract unifyTargetFeatures.
Thu, Jun 25, 1:39 PM · Restricted Project
yaxunl updated the diff for D82579: [NFC] Extract unifyTargetFeatures.

return the unified features.

Thu, Jun 25, 11:54 AM · Restricted Project
yaxunl added inline comments to D82579: [NFC] Extract unifyTargetFeatures.
Thu, Jun 25, 11:54 AM · Restricted Project
yaxunl added inline comments to D82506: [HIP] Add missing options for lto.
Thu, Jun 25, 10:14 AM · Restricted Project
yaxunl updated the diff for D82506: [HIP] Add missing options for lto.

Fix issue about -mattr. Also use generic LTO option translation and use -plugin-opt.

Thu, Jun 25, 10:14 AM · Restricted Project
yaxunl added a parent revision for D82506: [HIP] Add missing options for lto: D82579: [NFC] Extract unifyTargetFeatures.
Thu, Jun 25, 10:13 AM · Restricted Project
yaxunl added a child revision for D82579: [NFC] Extract unifyTargetFeatures: D82506: [HIP] Add missing options for lto.
Thu, Jun 25, 10:13 AM · Restricted Project
yaxunl created D82579: [NFC] Extract unifyTargetFeatures.
Thu, Jun 25, 10:13 AM · Restricted Project

Wed, Jun 24

yaxunl created D82506: [HIP] Add missing options for lto.
Wed, Jun 24, 3:47 PM · Restricted Project

Mon, Jun 22

yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

Only make non-capturing lambda host and device by default.

Mon, Jun 22, 1:59 PM · Restricted Project
yaxunl accepted D81963: [HIP] Move HIP Linking Logic into HIP ToolChain.

LGTM. Thanks.

Mon, Jun 22, 11:49 AM · Restricted Project, Restricted Project
yaxunl added a comment to D78655: [CUDA][HIP] Let lambda be host device by default.
In D78655#2107016, @tra wrote:
  • lambdas with any lambda-capture (which must therefore have an enclosing function) inherit the enclosing function's HDness.

Nit: *any* capture does not necessarily imply existence of the enclosing function. One can explicitly capture variables in the global scope. E.g.:

int x;
auto l = [x=x](){ return x;};
Mon, Jun 22, 11:49 AM · Restricted Project
yaxunl committed rG2580635bd2f3: Let HIP default include respect -nogpuinc and -nogpulib (authored by yaxunl).
Let HIP default include respect -nogpuinc and -nogpulib
Mon, Jun 22, 5:53 AM
yaxunl added a comment to D81176: [HIP] Add default header and include path.

This broke a test clang/test/Tooling/clang-check-offload.cpp for a critical Linux distro at Facebook. With this change, the test adds a -include __clang_hip_runtime_wrapper argument. The wrapper includes some standard c++ headers, but our distro don't have those headers in the default include paths, thus causing a break.

I notice this behavior doesn't happen for CUDA tests, which also rely on a similar __clang_cuda_runtime_wrapper. I think what's causing the difference is the different handling of nogpuinc/nogpulib option. My knowledge on this area is limited, so correct me if I'm wrong. CUDA seems to respect nogpuinc and doesn't include its wrapper if the flag is provided: https://github.com/llvm/llvm-project/blob/master/clang/lib/Driver/ToolChains/Cuda.cpp#L255. But based on this change, HIP does things differently: https://github.com/llvm/llvm-project/blob/master/clang/lib/Driver/ToolChains/AMDGPU.cpp#L226.

If I modify RocmInstallationDetector::AddHIPIncludeArgs to also respect nogpuinc/nogpulib, the test will pass for us. Is it a mistake for HIP to always include the wrapper file? Could you provide a fix for this issue? Thanks!

Mon, Jun 22, 5:52 AM · Restricted Project

Fri, Jun 19

yaxunl added a comment to D78655: [CUDA][HIP] Let lambda be host device by default.

There are two behaviors that seem to make sense:

  • Treat lambdas as implicitly HD (like constexpr functions) in all CUDA / HIP language modes. I don't think it makes sense for lambdas to become implicitly HD in C++17 simply because they become implicitly constexpr, nor for their HDness to depend on whether their parameter types happen to be literal types, etc. So in C++17, where lambdas are constexpr whenever they can be, the logical behavior would seem to be that lambdas are implicitly HD. And then for consistency with that, I'd expect them to be implicitly HD across all language modes.
  • Implicitly give lambdas the same HD-ness as the enclosing function (if there is one).

    I would think the best choice may be to do both of these things: if there is an enclosing function, inherit its host or device attributes. And if not, then treat the lambda as implicitly HD. A slight variation on that, that might be better: lambdas with no lambda-capture are implicitly HD; lambdas with any lambda-capture (which must therefore have an enclosing function) inherit the enclosing function's HDness.

    (Note that if we go this way, it makes no difference if there are reference captures, because they're always references on the same "side".)
Fri, Jun 19, 7:32 PM · Restricted Project
yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

improve diagnostic message

Fri, Jun 19, 7:32 PM · Restricted Project
yaxunl updated the diff for D78655: [CUDA][HIP] Let lambda be host device by default.

Revised by Richard's comments.

Fri, Jun 19, 2:09 PM · Restricted Project

Thu, Jun 18

yaxunl committed rGc830d517b4e4: [HIP] Enable -amdgpu-internalize-symbols (authored by yaxunl).
[HIP] Enable -amdgpu-internalize-symbols
Thu, Jun 18, 1:42 PM
yaxunl closed D81959: [HIP] Enable -amdgpu-internalize-symbols.
Thu, Jun 18, 1:42 PM · Restricted Project
yaxunl added inline comments to D81959: [HIP] Enable -amdgpu-internalize-symbols.
Thu, Jun 18, 9:13 AM · Restricted Project
yaxunl committed rG92d8ad02e92f: [HIP] Fix rocm not found on rocm3.5 (authored by yaxunl).
[HIP] Fix rocm not found on rocm3.5
Thu, Jun 18, 5:58 AM
yaxunl closed D81713: [HIP] Fix rocm not found on rocm3.5.
Thu, Jun 18, 5:58 AM · Restricted Project

Wed, Jun 17

yaxunl added a comment to D81713: [HIP] Fix rocm not found on rocm3.5.

I will commit this patch since it allows hipcc to use old rocm device library. Will fix other issues later.

Wed, Jun 17, 9:35 PM · Restricted Project

Tue, Jun 16

yaxunl added a comment to D81963: [HIP] Move HIP Linking Logic into HIP ToolChain.

The only thing that concerns me is that you called clang-offload-unbundler twice to unbundle a fat binary, one for host, one for device. One call of clang-offload-unbundler is supposed to unbundle everything.

Tue, Jun 16, 2:50 PM · Restricted Project, Restricted Project
yaxunl added a comment to D81959: [HIP] Enable -amdgpu-internalize-symbols.

Isn't the internalization implied by LTO? I thought part of the appeal of LTO is killing this off

Tue, Jun 16, 1:44 PM · Restricted Project
yaxunl created D81959: [HIP] Enable -amdgpu-internalize-symbols.
Tue, Jun 16, 12:39 PM · Restricted Project
yaxunl added inline comments to D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .
Tue, Jun 16, 12:39 PM · Restricted Project

Mon, Jun 15

yaxunl committed rG6752786d657a: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc (authored by yaxunl).
[HIP] Do not use llvm-link/opt/llc for -fgpu-rdc
Mon, Jun 15, 6:14 PM
yaxunl closed D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .
Mon, Jun 15, 6:14 PM · Restricted Project
yaxunl committed rGe8090d83fd92: [HIP] Do not call opt/llc for -fno-gpu-rdc (authored by yaxunl).
[HIP] Do not call opt/llc for -fno-gpu-rdc
Mon, Jun 15, 4:04 PM
yaxunl closed D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc.
Mon, Jun 15, 4:03 PM · Restricted Project
yaxunl updated the diff for D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .

fix tests

Mon, Jun 15, 1:14 PM · Restricted Project
yaxunl added inline comments to D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .
Mon, Jun 15, 1:14 PM · Restricted Project
yaxunl added inline comments to D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .
Mon, Jun 15, 12:41 PM · Restricted Project
yaxunl updated the diff for D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .

use -mcpu instead of march in HIP toolchain.

Mon, Jun 15, 12:37 PM · Restricted Project
yaxunl added inline comments to D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .
Mon, Jun 15, 12:36 PM · Restricted Project
yaxunl created D81861: [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc .
Mon, Jun 15, 11:31 AM · Restricted Project

Fri, Jun 12

yaxunl updated the diff for D80750: llvm-link: Add module flag behavior MergeTargetId.

fix typo in tests

Fri, Jun 12, 6:48 PM · Restricted Project
yaxunl added a comment to D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc.
In D81627#2090499, @tra wrote:

LGTM. Good to go if @arsenm is OK with fixing -fgpu-rdc in a separate patch.

Fri, Jun 12, 1:08 PM · Restricted Project
yaxunl added a comment to D60620: [HIP] Support target id by --offload-arch.
In D60620#2067134, @tra wrote:

Do you expect users to specify these IDs? How do you see it being used in practice? I think you do need to implement a user-friendly shortcut and expand it to the detailed offload-id internally. I'm fine with allowing explicit offload id as a hidden argument, but I don't think it's suitable for something that will be used by everyone who can't be expected to be aware of all the gory details of particular GPU features.

The good thing about this target id is that it is backward compatible with GPU arch. For common users who are not concerned with specific GPU configurations, they can just use the old GPU arch and nothing changes. This is because GPU arch without features implies default value for these features, which work on all configurations. For advanced users who do need to build for specific GPU configurations, they should already have the knowledge about the name and meaning of these configurations by reading the AMDGPU user guide (http://llvm.org/docs/AMDGPUUsage.html). Therefore a target id in the form of gfx908:xnack+ is not something cryptic to them. On the other hand, an encoded GPU arch like gfx908a is cryptic since it has no meaning at all.

Fri, Jun 12, 6:58 AM
yaxunl added a comment to D81713: [HIP] Fix rocm not found on rocm3.5.

Can you add tests for this? Is this also sufficient with the directory layout change?

Fri, Jun 12, 6:58 AM · Restricted Project

Thu, Jun 11

yaxunl added inline comments to D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc.
Thu, Jun 11, 9:57 PM · Restricted Project
yaxunl updated the diff for D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc.

revised by Artem's comments.

Thu, Jun 11, 9:57 PM · Restricted Project
yaxunl added a comment to D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc.

It doesn't matter if we don't support isa linking. We should just use clang and default to -flto. LTO "just works" as is

This is a step forward, but the lack of ISA linking shouldn't block eliminating the use of llc/opt

Thu, Jun 11, 9:24 PM · Restricted Project
yaxunl created D81713: [HIP] Fix rocm not found on rocm3.5.
Thu, Jun 11, 9:24 PM · Restricted Project

Wed, Jun 10

yaxunl committed rGaf00eb25f890: Fix __clang_cuda_math_forward_declares.h (authored by yaxunl).
Fix __clang_cuda_math_forward_declares.h
Wed, Jun 10, 9:02 PM
yaxunl created D81627: [HIP] Do not call opt/llc for -fno-gpu-rdc.
Wed, Jun 10, 7:25 PM · Restricted Project

Jun 9 2020

yaxunl accepted D81427: [hip] Fix device-only relocatable code compilation..

LGTM. thanks

Jun 9 2020, 10:25 AM · Restricted Project

Jun 8 2020

yaxunl committed rG4615abc11f2f: Rename arg name in __clang_hip_math.h (authored by yaxunl).
Rename arg name in __clang_hip_math.h
Jun 8 2020, 11:36 AM

Jun 6 2020

yaxunl committed rG8422bc9efcbc: recommit "[HIP] Add default header and include path" (authored by yaxunl).
recommit "[HIP] Add default header and include path"
Jun 6 2020, 11:44 AM
yaxunl added a comment to D81176: [HIP] Add default header and include path.

One more example failure: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/16333

(Note I had re-reverted your reland, see the 2 comments above your comment.)

Jun 6 2020, 11:44 AM · Restricted Project

Jun 5 2020

yaxunl accepted D81309: [mlir][mlir-rocm-runner] Detect HIP version and AMD ISA version..

LGTM

Jun 5 2020, 7:32 PM · Restricted Project
yaxunl added a comment to D81176: [HIP] Add default header and include path.

reverted.

The difficulty for fixing these failures is that they only show up on some systems I do not have access and cannot see the complete output.

Jun 5 2020, 6:59 PM · Restricted Project
yaxunl committed rG1fa43e0b34d9: recommit "[HIP] Add default header and include path" (authored by yaxunl).
recommit "[HIP] Add default header and include path"
Jun 5 2020, 5:55 PM
yaxunl committed rG8a8c6913a931: Revert "[HIP] Add default header and include path" (authored by yaxunl).
Revert "[HIP] Add default header and include path"
Jun 5 2020, 12:57 PM
yaxunl added a reverting change for rG11d06b9511bd: [HIP] Add default header and include path: rG8a8c6913a931: Revert "[HIP] Add default header and include path".
Jun 5 2020, 12:57 PM
yaxunl committed rG392843617acb: Attempt to fix hip-include-path.hip (authored by yaxunl).
Attempt to fix hip-include-path.hip
Jun 5 2020, 12:56 PM
yaxunl added a comment to D81176: [HIP] Add default header and include path.
Jun 5 2020, 12:54 PM · Restricted Project
yaxunl added a comment to D81176: [HIP] Add default header and include path.

Also still failing on mac: http://45.33.8.238/mac/14992/step_7.txt

Jun 5 2020, 12:54 PM · Restricted Project
yaxunl committed rGee608478623a: Attempt to fix hip-include-path.hip (authored by yaxunl).
Attempt to fix hip-include-path.hip
Jun 5 2020, 11:49 AM
yaxunl committed rGe987c372185d: Fix lit tests hip-include-path.hip and hip-host-cpu-macros.cu (authored by yaxunl).
Fix lit tests hip-include-path.hip and hip-host-cpu-macros.cu
Jun 5 2020, 10:39 AM
yaxunl committed rG11d06b9511bd: [HIP] Add default header and include path (authored by yaxunl).
[HIP] Add default header and include path
Jun 5 2020, 10:05 AM
yaxunl closed D81176: [HIP] Add default header and include path.
Jun 5 2020, 10:04 AM · Restricted Project
yaxunl added inline comments to D81176: [HIP] Add default header and include path.
Jun 5 2020, 8:18 AM · Restricted Project
yaxunl added a comment to D78759: Add Statically Linked Libraries.

@echristo Aaron has addressed most of the comments. The major remaining issue is that the general linker
calls AddGenerateObjFileFromHIPFatBinary, which is supposed to be part of HIP
toolchain. This issue is not new, since the existing gnutools::Linker::ConstructJob
already did the same thing. Is it OK to land this patch and leave the refactoring of
AddGenerateObjFileFromHIPFatBinary to a separate patch? Thanks.

Jun 5 2020, 4:55 AM · Restricted Project, Restricted Project

Jun 4 2020

yaxunl committed rG263390d4f5f2: [CUDA][HIP] Fix implicit HD function resolution (authored by yaxunl).
[CUDA][HIP] Fix implicit HD function resolution
Jun 4 2020, 2:24 PM
yaxunl closed D80450: [CUDA][HIP] Fix implicit HD function resolution.
Jun 4 2020, 2:24 PM · Restricted Project
yaxunl updated the summary of D81176: [HIP] Add default header and include path.
Jun 4 2020, 11:33 AM · Restricted Project
yaxunl created D81176: [HIP] Add default header and include path.
Jun 4 2020, 11:00 AM · Restricted Project

Jun 3 2020

yaxunl committed rG049d860707ef: [CUDA][HIP] Fix constexpr variables for C++17 (authored by yaxunl).
[CUDA][HIP] Fix constexpr variables for C++17
Jun 3 2020, 7:18 PM
yaxunl closed D79237: [CUDA][HIP] Fix constexpr variables for C++17.
Jun 3 2020, 7:17 PM · Restricted Project
yaxunl added a comment to D80450: [CUDA][HIP] Fix implicit HD function resolution.
In D80450#2071696, @tra wrote:
In D80450#2055463, @tra wrote:

Is this patch supposed to be used with D79526 or instead of it?

^^^ I don't think this has been answered. I would like to test this change before it lands.

Jun 3 2020, 10:25 AM · Restricted Project
yaxunl added inline comments to D80816: [OpenMP] Add unbundling of archives containing bundled object files into device specific archives..
Jun 3 2020, 9:18 AM · Restricted Project, Restricted Project
yaxunl committed rG04abbb3a7818: [HIP] Change default --gpu-max-threads-per-block value to 1024 (authored by yaxunl).
[HIP] Change default --gpu-max-threads-per-block value to 1024
Jun 3 2020, 8:15 AM
yaxunl closed D76795: [HIP] Change default --gpu-max-threads-per-block value to 1024.
Jun 3 2020, 8:14 AM · Restricted Project
yaxunl added a comment to D80450: [CUDA][HIP] Fix implicit HD function resolution.

ping

Jun 3 2020, 6:00 AM · Restricted Project