tahonermann added a comment.
I'm late to review and can no longer stamp an approval on this, but I'll note
for the historical record that the changes look good to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150913/new/
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe62175736551: [Clang][BFloat16] Upgrade __bf16 to arithmetic
type, change mangling, and… (authored by codemzs, committed by pengfei).
Changed prior
codemzs added a comment.
Hi @rjmccall, @pengfei, and @zahiraam,
Thank you for your valuable review and acceptance of my patch. As I lack commit
access, could I kindly request one of you to perform the commit on my behalf?
Please use the following command: `git commit --amend --author="M.
codemzs updated this revision to Diff 526072.
codemzs marked an inline comment as done.
codemzs set the repository for this revision to rG LLVM Github Monorepo.
codemzs added a comment.
Addresses @rjmccall suggestions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
rjmccall added a comment.
One slight miscommunication. Otherwise this LGTM, thank you.
Comment at: clang/docs/LanguageExtensions.rst:824
+provide native architectural support for arithmetic on these formats. These
+targets are noted in the lists of supported targets above.
+
codemzs updated this revision to Diff 525920.
codemzs marked 3 inline comments as done.
codemzs added a comment.
Addresses feedback on extended floating type documentation from @rjmccall and
@pengfei
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150913/new/
pengfei added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:852
``double`` when passed to ``printf``, so the programmer must explicitly cast
it to
``double`` before using it with an ``%f`` or similar specifier.
rjmccall wrote:
> codemzs
rjmccall added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:852
``double`` when passed to ``printf``, so the programmer must explicitly cast
it to
``double`` before using it with an ``%f`` or similar specifier.
codemzs wrote:
> pengfei
codemzs added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:852
``double`` when passed to ``printf``, so the programmer must explicitly cast
it to
``double`` before using it with an ``%f`` or similar specifier.
pengfei wrote:
> rjmccall
pengfei added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:852
``double`` when passed to ``printf``, so the programmer must explicitly cast
it to
``double`` before using it with an ``%f`` or similar specifier.
rjmccall wrote:
> pengfei
codemzs updated this revision to Diff 525298.
codemzs marked 5 inline comments as done.
codemzs retitled this revision from "[Clang][Bfloat16] Upgrade __bf16 to
arithmetic type, change mangling, and extend excess precision support." to
"[Clang][BFloat16] Upgrade __bf16 to arithmetic type, change
rjmccall added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:852
``double`` when passed to ``printf``, so the programmer must explicitly cast
it to
``double`` before using it with an ``%f`` or similar specifier.
pengfei wrote:
> rjmccall
pengfei added inline comments.
Comment at: clang/docs/LanguageExtensions.rst:852
``double`` when passed to ``printf``, so the programmer must explicitly cast
it to
``double`` before using it with an ``%f`` or similar specifier.
rjmccall wrote:
> Suggested
rjmccall added a comment.
Apologies for misunderstanding what this patch was doing. This all seems
reasonable, and the code changes look good. I think the documentation needs
significant reorganization; I've attached a draft. Please review for
correctness.
Comment at:
zahiraam added a comment.
LGTM. Just a minor comment.
Comment at: clang/include/clang/Basic/LangOptions.def:321
ENUM_LANGOPT(Float16ExcessPrecision, ExcessPrecisionKind, 2, FPP_Standard,
"Intermediate truncation behavior for floating point arithmetic")
pengfei added a comment.
LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150913/new/
https://reviews.llvm.org/D150913
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
zahiraam added inline comments.
Comment at: clang/test/CodeGen/X86/bfloat16.cpp:2-3
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 2
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +fullbf16
-S -emit-llvm
codemzs added inline comments.
Comment at: clang/lib/Basic/Targets/X86.cpp:362-363
HasX87 = true;
+} else if (Feature == "+fullbf16") {
+ HasFullBFloat16 = true;
}
pengfei wrote:
> Maybe not need it.
Clarified on the other thread but if you
codemzs updated this revision to Diff 524467.
codemzs marked 12 inline comments as done.
codemzs added a comment.
@pengfei, @zahiraam, I appreciate your feedback.
@pengfei, the `HasFullBFloat16` flag is primarily for identifying hardware with
native `bfloat16` support to facilitate automatic
zahiraam added inline comments.
Comment at: clang/lib/Basic/Targets/X86.cpp:381
HasBFloat16 = SSELevel >= SSE2;
codemzs wrote:
> rjmccall wrote:
> > pengfei wrote:
> > > I'm not sure if I understand the meaning of `HasFullBFloat16`. If it is
> > > used
pengfei added inline comments.
Comment at: clang/lib/Basic/Targets/X86.cpp:381
HasBFloat16 = SSELevel >= SSE2;
codemzs wrote:
> rjmccall wrote:
> > pengfei wrote:
> > > I'm not sure if I understand the meaning of `HasFullBFloat16`. If it is
> > > used
codemzs marked an inline comment as done.
codemzs added a comment.
I believe I had updated the `__bf16` documentation in
`/llvm-project/clang/docs/LanguageExtensions.rst`, but it appears to have been
omitted in this patch. I assure you, I'll rectify this in the next iteration.
rjmccall added inline comments.
Comment at: clang/lib/Basic/Targets/X86.cpp:381
HasBFloat16 = SSELevel >= SSE2;
pengfei wrote:
> I'm not sure if I understand the meaning of `HasFullBFloat16`. If it is used
> for target that supports arithmetic
pengfei added a comment.
Great work! Thanks for the patch!
Comment at: clang/include/clang/AST/ASTContext.h:1102
CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON
- CanQualType BFloat16Ty;
+ CanQualType BFloat16Ty; // ISO/IEC/IEEE 60559.
CanQualType Float16Ty; // C11
codemzs added a comment.
Misc style improvement.
Comment at: clang/lib/AST/Type.cpp:2199
if (const auto *BT = dyn_cast(CanonicalType))
-return BT->getKind() >= BuiltinType::Bool &&
- BT->getKind() <= BuiltinType::Ibm128 &&
- BT->getKind() !=
codemzs created this revision.
codemzs added reviewers: tahonermann, rjmccall, zahiraam, stuij, pengfei,
erichkeane.
Herald added subscribers: mattd, gchakrabarti, asavonic, kerbowa,
kristof.beyls, jvesely.
Herald added a project: All.
codemzs requested review of this revision.
Herald added
26 matches
Mail list logo