-
Notifications
You must be signed in to change notification settings - Fork 246
Implementation of vector compute extension #569
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
Conversation
|
In general the PR looks good to me. It is marked as draft. Are there anything else to be done? If not I suggest to push "Ready for review" button. |
Extension is published at intel/llvm#1611
Extension is published at intel/llvm#1612 Co-Authored-By: Aleksandr Bezzubikov <[email protected]> Co-Authored-By: Aleksander Us <[email protected]> Co-Authored-By: Alexey Sachkov <[email protected]> Co-Authored-By: Alexey Sotkin <[email protected]> Co-Authored-By: Anton Sidorenko <[email protected]> Co-Authored-By: Gang Chen <[email protected]> Co-Authored-By: Kai Chen <[email protected]> Co-Authored-By: Konstantin Vladimirov <[email protected]> Co-Authored-By: Wei Pan <[email protected]> Change-Id: Ic8bd645316f054729b8571efd2b9800a38cb723c
AlexeySachkov
left a comment
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.
A few minor comments. Other than that, looks good to me
lib/SPIRV/SPIRVReader.cpp
Outdated
| F->addAttribute(AttributeList::FunctionIndex, Attr); | ||
| } | ||
|
|
||
| if (F->getCallingConv() != CallingConv::SPIR_KERNEL) |
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.
What is the point of this if if we anyway return true below?
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.
An artifact of previous revisions. Fixed.
lib/SPIRV/VectorComputeUtil.cpp
Outdated
| // This file is distributed under the University of Illinois Open Source | ||
| // License. See LICENSE.TXT for details. | ||
| // | ||
| // Copyright (c) 2018 Intel Corporation. All rights reserved. |
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.
| // Copyright (c) 2018 Intel Corporation. All rights reserved. | |
| // Copyright (c) 2020 Intel Corporation. All rights reserved. |
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.
Fixed
lib/SPIRV/VectorComputeUtil.h
Outdated
| // This file is distributed under the University of Illinois Open Source | ||
| // License. See LICENSE.TXT for details. | ||
| // | ||
| // Copyright (c) 2018 Intel Corporation. All rights reserved. |
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.
| // Copyright (c) 2018 Intel Corporation. All rights reserved. | |
| // Copyright (c) 2020 Intel Corporation. All rights reserved. |
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.
Fixed
lib/SPIRV/VectorComputeUtil.h
Outdated
| #include "SPIRVInternal.h" | ||
| #include "SPIRVUtil.h" | ||
| #include "spirv.hpp" | ||
| #include "llvm/IR/Module.h" |
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.
| #include "llvm/IR/Module.h" |
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.
Fixed
| @@ -0,0 +1,32 @@ | |||
| ; RUN: llvm-as %s -o %t.bc | |||
| ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+SPV_INTEL_vector_compute --spirv-ext=+SPV_KHR_float_controls --spirv-ext=+SPV_INTEL_float_controls2 | |||
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.
| ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+SPV_INTEL_vector_compute --spirv-ext=+SPV_KHR_float_controls --spirv-ext=+SPV_INTEL_float_controls2 | |
| ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+SPV_INTEL_vector_compute,+SPV_KHR_float_controls,+SPV_INTEL_float_controls2 |
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.
Fixed
| @@ -0,0 +1,36 @@ | |||
| ; RUN: llvm-as %s -o %t.bc | |||
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.
Since these tests are performing both direct and reverse translation, could you please move them into transcoding folder?
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.
Done
Backend part Extension is published at intel/llvm#1612 Co-Authored-By: Aleksandr Bezzubikov <[email protected]> Co-Authored-By: Aleksander Us <[email protected]> Co-Authored-By: Alexey Sachkov <[email protected]> Co-Authored-By: Alexey Sotkin <[email protected]> Co-Authored-By: Anton Sidorenko <[email protected]> Co-Authored-By: Gang Chen <[email protected]> Co-Authored-By: Kai Chen <[email protected]> Co-Authored-By: Konstantin Vladimirov <[email protected]> Co-Authored-By: Wei Pan <[email protected]> Change-Id: Ic8bd645316f054729b8571efd2b9800a38cb723c
Frontend part Extension is published at intel/llvm#1612 Co-Authored-By: Aleksandr Bezzubikov <[email protected]> Co-Authored-By: Aleksander Us <[email protected]> Co-Authored-By: Alexey Sachkov <[email protected]> Co-Authored-By: Alexey Sotkin <[email protected]> Co-Authored-By: Anton Sidorenko <[email protected]> Co-Authored-By: Gang Chen <[email protected]> Co-Authored-By: Kai Chen <[email protected]> Co-Authored-By: Konstantin Vladimirov <[email protected]> Co-Authored-By: Wei Pan <[email protected]> Change-Id: Ic8bd645316f054729b8571efd2b9800a38cb723c
SPV_INTEL_float_controls2 and SPV_KHR_float_controls extensions Extensions are published at intel/llvm#1612 intel/llvm#1611
Extensions are published at intel/llvm#1612 and intel/llvm#1611