-
Notifications
You must be signed in to change notification settings - Fork 64
Changes for new cute apis prefetch transpose vnni #570
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds comprehensive unit test coverage for three new Intel XE GPU 2D block operation APIs: XE_PREFETCH_2D, XE_LOAD_2D_VNNI, and XE_LOAD_2D_TRANSPOSE. All tests are conditionally compiled for IGC version 2.18 or higher.
- Validates API declarations and compile-time constraints for VNNI and transpose operations
- Tests prefetch operations with uint8, int16, and float data types
- Ensures proper integration with the existing CuTe tensor framework
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/unit/cute/intel_xe/xe_vnni_2d.cpp | Tests API declaration and static assertions for VNNI 2D load operations |
| test/unit/cute/intel_xe/xe_transpose_2d.cpp | Tests API declaration and validates compile-time constraints for transpose operations |
| test/unit/cute/intel_xe/xe_copy_prefetch_2d.cpp | Implements kernel-based tests for 2D prefetch operations across multiple data types |
| test/unit/cute/intel_xe/CMakeLists.txt | Registers the three new test files in the build system |
Comments suppressed due to low confidence (1)
test/unit/cute/intel_xe/xe_transpose_2d.cpp:1
- Missing article 'THE' before 'POSSIBILITY'. Should be 'EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'
/***************************************************************************************************
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| * OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE. |
Copilot
AI
Oct 20, 2025
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.
Missing article 'THE' before 'POSSIBILITY'. Should be 'EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'
| * OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE. | |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| * OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE. |
Copilot
AI
Oct 20, 2025
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.
Missing article 'THE' before 'POSSIBILITY'. Should be 'EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'
| * OF THIS SOFTWARE, EVEN IF ADVISED OF POSSIBILITY OF SUCH DAMAGE. | |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
||
| // Matrix dimensions - must be compatible with block 2D constraints | ||
| constexpr int M = Height; | ||
| constexpr int N = Width * sizeof_bits_v<Element> / Bits; |
Copilot
AI
Oct 20, 2025
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.
Integer division may produce incorrect results. Since sizeof_bits_v<Element> returns bits and is being divided by Bits, this should use floating-point division and rounding, or the multiplication order should be changed to (Width * Bits) / sizeof_bits_v<Element> if calculating elements from bits.
| constexpr int N = Width * sizeof_bits_v<Element> / Bits; | |
| constexpr int N = (Width * Bits) / sizeof_bits_v<Element>; |
Created unit tests for Intel XE GPU 2D block operations
Files Added
xe_copy_prefetch_2d.cpp -
XE_PREFETCH_2Doperationsxe_vnni_2d.cpp -
XE_LOAD_2D_VNNIAPI validationxe_transpose_2d.cpp -
XE_LOAD_2D_TRANSPOSEAPI validationTest Results
6/6 tests passing (0ms execution time each)
3 prefetch tests (uint8, int16, float)
1 VNNI API test
2 transpose tests (API + constraints)