This repository was archived by the owner on Mar 28, 2023. It is now read-only.
forked from llvm/llvm-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 130
[ESIMD] Add more tests for new xmx::dpas() #1291
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//==---------------- dpas_bf16.cpp - DPC++ ESIMD on-device test ----------==// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// REQUIRES: gpu-intel-pvc || gpu-intel-dg2 || esimd_emulator | ||
// UNSUPPORTED: cuda || hip | ||
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_kernel %s -o %t.out | ||
// RUN: %GPU_RUN_PLACEHOLDER %t.out | ||
|
||
// This test verifies DPAS support for bfloat16. | ||
|
||
#include "dpas_common.hpp" | ||
|
||
int main(int argc, const char *argv[]) { | ||
queue Q(esimd_test::ESIMDSelector{}, esimd_test::createExceptionHandler()); | ||
|
||
bool Print = argc > 1 && std::string(argv[1]) == "-debug"; | ||
bool Passed = true; | ||
|
||
constexpr bool LetDeduceArgs = true; | ||
Passed &= tests<8, 8, bf16, bf16, LetDeduceArgs>(Q, Print); | ||
Passed &= tests<8, 4, bf16, bf16, LetDeduceArgs>(Q, Print); | ||
Passed &= tests<8, 1, bf16, bf16, LetDeduceArgs>(Q, Print); | ||
|
||
// TODO: Enable these cases when esimd::simd(ptr) constructor is fixed. | ||
// Passed &= tests<8, 5, bf16, bf16, LetDeduceArgs>(Q, Print); | ||
// Passed &= tests<8, 3, bf16, bf16, LetDeduceArgs>(Q, Print); | ||
|
||
std::cout << (Passed ? "Test Passed\n" : "Test FAILED\n"); | ||
return Passed ? 0 : 1; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
as we talked, these testcases should be re-visited and maybe uncommented in a follow-up patch.