Skip to content

[SYCL][FPGA] Implementing __builtin_intel_fpga_mem() #1033

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

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

mohammadfawaz
Copy link
Contributor

This patch creates and implements the __builtin_intel_fpga_mem builtin for
FPGA SYCL device. The builtin is used to indicate the characteristics of
the load-store unit (LSU) to be used when de-referencing the pointer.

The builtin accepts 3 arguments:

  1. A pointer to a first class lvalue or to an rvalue.
  2. A integer bitmask that encodes various LSU parameters. These will be
    added for each language in separate libraries.
  3. An integer value indicating the size of the LSU cache.

The effect of this is observable only through the FPGA hardware
generated. It lowers to an assignment in all other contexts.

Implementation strategy: In CodeGen, we generate a pointer annotation:
T* llvm.ptr.annotation.(T, "{params:..}{cachesize:..}", ...)

Signed-off-by: Mohammad Fawaz [email protected]

Copy link
Contributor

@erichkeane erichkeane left a comment

Choose a reason for hiding this comment

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

1 nit, otherwise LGTM.

This patch creates and implements the __builtin_intel_fpga_mem builtin for
FPGA SYCL device. The builtin is used to indicate the characteristics of
the load-store unit (LSU) to be used when de-referencing the pointer.

The builtin accepts 3 arguments:
1. A pointer to a first class lvalue or to an rvalue.
2. A integer bitmask that encodes various LSU parameters. These will be
   added for each language in separate libraries.
3. An integer value indicating the size of the LSU cache.

The effect of this is observable only through the FPGA hardware
generated. It lowers to an assignment in all other contexts.

Implementation strategy: In CodeGen, we generate a pointer annotation:
T* llvm.ptr.annotation.*(T*, "{params:..}{cachesize:..}", ...)

Signed-off-by: Mohammad Fawaz <[email protected]>
Copy link
Contributor

@MrSidims MrSidims left a comment

Choose a reason for hiding this comment

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

Thanks!

@bader bader merged commit 1e33c01 into intel:sycl Jan 23, 2020
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.

5 participants