-
Notifications
You must be signed in to change notification settings - Fork 247
[SYCL][FPGA] Enable translation of ac_fixed functions #653
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
[SYCL][FPGA] Enable translation of ac_fixed functions #653
Conversation
|
This review is created as a continue of #614 |
|
@AlexeySotkin @AlexeySachkov @vmaksimo @MrSidims Please review. |
271b96c to
b6b30a8
Compare
b6b30a8 to
7cf617c
Compare
|
LGTM |
| ; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_arbitrary_precision_integers,+SPV_INTEL_arbitrary_precision_fixed_point -o %t.spv | ||
| ; RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV | ||
|
|
||
| ; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_INTEL_arbitrary_precision_integers -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV-NEGATIVE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we produce a valid SPIR-V in this case? If no, I think we should report an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case if we translate to SPIR-V without SPV_INTEL_arbitrary_precision_fixed_point then those built-ins are translated as user defined function calls. I suppose that it is technically valid but linkage will be failed.
I may add error generation, but the same mechanism should be added for hls_float built-ins too. Sinse that feature has already merged I would address this change in a separate PR for both features later.
|
Please resolve the conflicts. |
ea9c637 to
d3ed6f5
Compare
This patch introduces SPV_INTEL_arbitrary_precision_fixed_point extension, which adds operations for arbitrary precision fixed point numbers. The ac_fixed datatype is represented as a pseudo type using OpTypeInt. Its parameters are: * W - total width of the datatype. It's encoded in the width of the OpTypeInt. * I - determines the position of the decimal point. * S - determines if this is a signed or an unsigned number. Full specification (intel/llvm#1934): https://github.com/intel/llvm/blob/2f6e965e686354fbb25f9c177a667a646de302eb/sycl/doc/extensions/SPIRV/SPV_INTEL_arbitrary_precision_fixed_point.asciidoc
d3ed6f5 to
a277abb
Compare
|
@AlexeySachkov Could you please review? |
… extensions This patch addresses KhronosGroup#653 (comment) If the appropriate extension for arbitrary precision instruction is not enabled, invalid IR will be produced. Report an error in this case.
… extensions (#714) This patch addresses [comment][1] If the appropriate extension for arbitrary precision instruction is not enabled, invalid IR will be produced. Report an error in this case. [1]: #653 (comment)
… extensions (intel#714) This patch addresses [comment][1] If the appropriate extension for arbitrary precision instruction is not enabled, invalid IR will be produced. Report an error in this case. [1]: KhronosGroup/SPIRV-LLVM-Translator#653 (comment)
…up#653) This patch introduces SPV_INTEL_arbitrary_precision_fixed_point extension, which adds operations for arbitrary precision fixed point numbers. The ac_fixed datatype is represented as a pseudo type using OpTypeInt. Its parameters are: * W - total width of the datatype. It's encoded in the width of the OpTypeInt. * I - determines the position of the decimal point. * S - determines if this is a signed or an unsigned number. Full specification can be found in intel/llvm#1934 Co-authored-by: Viktoria Maksimova <[email protected]>
… extensions (KhronosGroup#714) This patch addresses [comment][1] If the appropriate extension for arbitrary precision instruction is not enabled, invalid IR will be produced. Report an error in this case. [1]: KhronosGroup#653 (comment)
This patch introduces SPV_INTEL_arbitrary_precision_fixed_point extension, which adds operations for arbitrary precision fixed point numbers. The ac_fixed datatype is represented as a pseudo type using OpTypeInt. Its parameters are: * W - total width of the datatype. It's encoded in the width of the OpTypeInt. * I - determines the position of the decimal point. * S - determines if this is a signed or an unsigned number. Full specification can be found in intel/llvm#1934 Co-authored-by: Viktoria Maksimova <[email protected]>
… extensions (#714) This patch addresses [comment][1] If the appropriate extension for arbitrary precision instruction is not enabled, invalid IR will be produced. Report an error in this case. [1]: #653 (comment)
…up#653) This patch introduces SPV_INTEL_arbitrary_precision_fixed_point extension, which adds operations for arbitrary precision fixed point numbers. The ac_fixed datatype is represented as a pseudo type using OpTypeInt. Its parameters are: * W - total width of the datatype. It's encoded in the width of the OpTypeInt. * I - determines the position of the decimal point. * S - determines if this is a signed or an unsigned number. Full specification can be found in intel/llvm#1934 Co-authored-by: Viktoria Maksimova <[email protected]>
…recision_fixed_point (KhronosGroup#653) Change-Id: I4773436f38a116b47d7cd41411838f6b0dfd2f69 Reviewed-on: https://git-amr-2.devtools.intel.com/gerrit/265338 Tested-by: LiuChen <[email protected]> Reviewed-by: LiuChen <[email protected]>
This patch introduces SPV_INTEL_arbitrary_precision_fixed_point extension,
which adds operations for arbitrary precision fixed point numbers.
The ac_fixed datatype is represented as a pseudo type using OpTypeInt. Its
parameters are:
Full specification (intel/llvm#1934):
https://github.com/intel/llvm/blob/2f6e965e686354fbb25f9c177a667a646de302eb/sycl/doc/extensions/SPIRV/SPV_INTEL_arbitrary_precision_fixed_point.asciidoc