Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use keywords for SME attributes #261

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

rsandifo-arm
Copy link
Contributor


name: Pull request
about: Technical issues, document format problems, bugs in scripts or feature proposal.


Thank you for submitting a pull request!

If this PR is about a bugfix:

Please use the bugfix label and make sure to go through the checklist below.

If this PR is about a proposal:

We are looking forward to evaluate your proposal, and if possible to
make it part of the Arm C Language Extension (ACLE) specifications.

We would like to encourage you reading through the contribution
guidelines
, in particular the section on submitting
a proposal
.

Please use the proposal label.

As for any pull request, please make sure to go through the below
checklist.

Checklist: (mark with X those which apply)

  • If an issue reporting the bug exists, I have mentioned it in the
    PR (do not bother creating the issue if all you want to do is
    fixing the bug yourself).
  • I have added/updated the SPDX-FileCopyrightText lines on top
    of any file I have edited. Format is SPDX-FileCopyrightText: Copyright {year} {entity or name} <{contact informations}>
    (Please update existing copyright lines if applicable. You can
    specify year ranges with hyphen , as in 2017-2019, and use
    commas to separate gaps, as in 2018-2020, 2022).
  • I have updated the Copyright section of the sources of the
    specification I have edited (this will show up in the text
    rendered in the PDF and other output format supported). The
    format is the same described in the previous item.
  • I have run the CI scripts (if applicable, as they might be
    tricky to set up on non-*nix machines). The sequence can be
    found in the contribution
    guidelines
    . Don't
    worry if you cannot run these scripts on your machine, your
    patch will be automatically checked in the Actions of the pull
    request.
  • I have added an item that describes the changes I have
    introduced in this PR in the section Changes for next
    release
    of the section Change Control/Document history
    of the document. Create Changes for next release if it does
    not exist. Notice that changes that are not modifying the
    content and rendering of the specifications (both HTML and PDF)
    do not need to be listed.
  • When modifying content and/or its rendering, I have checked the
    correctness of the result in the PDF output (please refer to the
    instructions on how to build the PDFs
    locally
    ).
  • The variable draftversion is set to true in the YAML header
    of the sources of the specifications I have modified.
  • Please DO NOT add my GitHub profile to the list of contributors
    in the README page of the project.

@rsandifo-arm rsandifo-arm changed the title Sme keywords Use keywords for SME attributes May 31, 2023
main/acle.md Show resolved Hide resolved
main/acle.md Show resolved Hide resolved
main/acle.md Outdated Show resolved Hide resolved
main/acle.md Outdated Show resolved Hide resolved
main/acle.md Outdated Show resolved Hide resolved
sdesmalen-arm added a commit to llvm/llvm-project that referenced this pull request Aug 8, 2023
This patch adds all the language-level function keywords defined in:

  ARM-software/acle#188 (merged)
  ARM-software/acle#261 (update after D148700 landed)

The keywords are used to control PSTATE.ZA and PSTATE.SM, which are
respectively used for enabling the use of the ZA matrix array and Streaming
mode. This information needs to be available on call sites, since the use
of ZA or streaming mode may have to be enabled or disabled around the
call-site (depending on the IR attributes set on the caller and the
callee). For calls to functions from a function pointer, there is no IR
declaration available, so the IR attributes must be added explicitly to the
call-site.

With the exception of '__arm_locally_streaming' and '__arm_new_za' the
information is part of the function's interface, not just the function
definition, and thus needs to be propagated through the
FunctionProtoType::ExtProtoInfo.

This patch adds the defintions of these keywords, as well as codegen and
semantic analysis to ensure conversions between function pointers are valid
and that no conflicting keywords are set. For example, '__arm_streaming'
and '__arm_streaming_compatible' are mutually exclusive.

Differential Revision: https://reviews.llvm.org/D127762
Copy link
Contributor

@sdesmalen-arm sdesmalen-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

main/acle.md Show resolved Hide resolved
main/acle.md Outdated Show resolved Hide resolved
@rsandifo-arm rsandifo-arm force-pushed the sme-keywords branch 2 times, most recently from f7a1285 to b9eda28 Compare August 17, 2023 14:29
A patch series recently went into Clang to support a kind of keyword
attribute that can appear wherever a standard attribute can appear,
and that appertains to whatever a standard attribute appertains to:
https://reviews.llvm.org/D148700

This patch changes the syntax used for SME to match this style, rather
than using GNU attributes.  That avoid the previous situation in which
older compilers would ignore (or just warn about) SME attributes,
and so would generate wrong code.
Copy link
Contributor

@sdesmalen-arm sdesmalen-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM still.

@rsandifo-arm rsandifo-arm merged commit 441ada0 into ARM-software:main Aug 17, 2023
3 checks passed
@rsandifo-arm rsandifo-arm deleted the sme-keywords branch August 17, 2023 15:04
CarolineConcatto pushed a commit to CarolineConcatto/acle that referenced this pull request Dec 6, 2023
A patch series recently went into Clang to support a kind of keyword
attribute that can appear wherever a standard attribute can appear,
and that appertains to whatever a standard attribute appertains to:
https://reviews.llvm.org/D148700

This patch changes the syntax used for SME to match this style, rather
than using GNU attributes.  That avoid the previous situation in which
older compilers would ignore (or just warn about) SME attributes,
and so would generate wrong code.
@@ -351,6 +351,14 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin
* Added a requirement on [`arm_new_za`](#arm_new_za) to set the initial
contents of ZA to zero.

#### Changes for next release
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean Changes in this release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the convention is to use “Changes in the next release” for changes that been made to the document since the last release (in other words, for changes that haven't yet been released, but that are queued up for the next/upcoming release). The “next release” part is then replaced with a release version just before the release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. That piece of text will be replaced in the release process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants