This is an archive of the discontinued LLVM Phabricator instance.

[X86] Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake
ClosedPublic

Authored by liutianle on Apr 10 2019, 6:55 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

liutianle created this revision.Apr 10 2019, 6:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2019, 6:55 PM
craig.topper retitled this revision from Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake to [X86] Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper Lake.Apr 10 2019, 7:13 PM
craig.topper added reviewers: spatel, RKSimon.
RKSimon added inline comments.Apr 17 2019, 1:32 PM
lib/Headers/avx512bf16intrin.h
23 ↗(On Diff #194625)

All of these need proper doxygen based descriptions - see xmmintrin.h etc. for examples.

test/CodeGen/avx512bf16-builtins.c
9 ↗(On Diff #194625)

add ret/arg types?

liutianle updated this revision to Diff 196195.Apr 23 2019, 1:49 AM

@RKSimon I add doxygen based descriptions in header files and return type check in test files. Please review again.

@RKSimon @craig.topper , could you please review again?

We seem to be missing test cases in test/Driver/x86-target-feature.c to test the command line options work. And test/Preprocessor/x86_target_features.c to make sure -mavx512bf16 enables avx512vl and avx512bw. Also need tests to make sure "-mavx512bf16 -mno-avx512bw" will leave bf16 disabled. Same for "-mavx512bf16 -mno-avx512vl"

lib/Basic/Targets/X86.cpp
667 ↗(On Diff #196195)

Need to also disable avx512fp16 when we disable "avx512vbmi" and "avx512vbmi2".

Need a new if to disable "avx512fp16" when "if (Name == "avx512vl" && !Enabled)"

craig.topper added inline comments.Apr 29 2019, 4:40 PM
lib/Basic/Targets/X86.cpp
667 ↗(On Diff #196195)

That should have said avx512bf16.

liutianle updated this revision to Diff 198168.May 4 2019, 11:57 PM
This revision is now accepted and ready to land.May 5 2019, 10:15 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2019, 1:23 AM