|
| 1 | +//==---------------- dpas_double.cpp - DPC++ ESIMD on-device test ---------==// |
| 2 | +// |
| 3 | +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | +// See https://llvm.org/LICENSE.txt for license information. |
| 5 | +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | +// |
| 7 | +//===----------------------------------------------------------------------===// |
| 8 | + |
| 9 | +// TODO: Actually, the test requires PVC emulator working as Rialto device, |
| 10 | +// or actual Rialto device. |
| 11 | +// Need to a) add 'gpu-intel-rlt'(or marketing name if there is such) |
| 12 | +// or b) add 'gpu-intel-rlt-emulator' instead. |
| 13 | +// REQUIRES: gpu-intel-pvc |
| 14 | + |
| 15 | +// RUN: %clangxx -fsycl -fsycl-device-code-split=per_kernel %s -o %t.out |
| 16 | +// TODO: The test can only be runned manually now because of lack of Rialto |
| 17 | +// target support in TC/QA-scripts. |
| 18 | +// RUNx: %GPU_RUN_PLACEHOLDER %t.out |
| 19 | + |
| 20 | +// This test verifies DPAS support for double type. |
| 21 | + |
| 22 | +// Info note: The guide on usage of PVC emulator emulating Rialto GPU. |
| 23 | +// 1) Proceed to goto.intel.com/fulsim |
| 24 | +// 2) Right mouse button click on the device e.g. “PVC Release”, |
| 25 | +// and “Open Link in New Tab”. Due to some glitch a regular left mouse click |
| 26 | +// does not work. |
| 27 | +// 3) Copy the address of needed zip file to clipboard. (e.g. |
| 28 | +// https://gfx-assets.fm.intel.com/artifactory/gfx-cobalt-assets-fm/Cobalt/Linux/PVC/65927/PVC-65927-Linux.zip) |
| 29 | +// 4) On Linux: wget --user $USER --ask-password |
| 30 | +// https://gfx-assets.fm.intel.com/artifactory/gfx-cobalt-assets-fm/Cobalt/Linux/PVC/66223/PVC-66223-Linux.zip |
| 31 | +// wget --user $USER --ask-password |
| 32 | +// https://gfx-assets.fm.intel.com/artifactory/gfx-cobalt-assets-fm/Cobalt/Linux/PVC/66405/PVC-66405-Linux.zip |
| 33 | +// 5) Unzip to folder, for example: /iusers/$USER/fulsim/PVC |
| 34 | +// 6) Open 2 linux command-shells (or tmux panels): I’ll call them: _test_ and |
| 35 | +// _pvc_ . |
| 36 | +// 7) In _pvc_ panel: |
| 37 | +// "COUNT=200; CUR=1; while [ "$CUR" -ne `expr $COUNT + 1` ]; \ |
| 38 | +// do /iusers/vklochko/ws/fulsim/PVC/AubLoad -device rlt.8x10x8.a0 -socket \ |
| 39 | +// tcp -swsbcheck fatal -msglevel terse ; CUR=`expr $CUR + 1`; done;" |
| 40 | +// 8) In _test_ panel: |
| 41 | +// cat > igdrcl.config |
| 42 | +// SetCommandStreamReceiver = 2 |
| 43 | +// ProductFamilyOverride = rlt |
| 44 | +// ForceDeviceId = 0x0b63 |
| 45 | +// PrintDebugSettings = 1 |
| 46 | +// |
| 47 | +// After following steps (1) to (7), just proceed to _test_ panel and run the |
| 48 | +// test in the directory with 'igdrcl.config' file as usual. E.g. "./a.out" |
| 49 | + |
| 50 | +#include "dpas_common.hpp" |
| 51 | + |
| 52 | +int main(int argc, const char *argv[]) { |
| 53 | + queue Q(esimd_test::ESIMDSelector, esimd_test::createExceptionHandler()); |
| 54 | + auto Dev = Q.get_device(); |
| 55 | + std::cout << "Running on " << Dev.get_info<info::device::name>() << std::endl; |
| 56 | + |
| 57 | + bool Print = argc > 1 && std::string(argv[1]) == "-debug"; |
| 58 | + bool Passed = true; |
| 59 | + |
| 60 | + constexpr bool LetDeduceArgs = true; |
| 61 | + constexpr int SystolicDepth = 8; |
| 62 | + constexpr int RepeatCount = 4; // the only avaialble repeat count for double |
| 63 | + constexpr int ExecutionSize = 8; // must be 8 for double type |
| 64 | + constexpr bool UseSrc0 = true; |
| 65 | + |
| 66 | + constexpr dpas_argument_type df = dpas_argument_type::df; |
| 67 | + |
| 68 | + Passed &= test<SystolicDepth, RepeatCount, df, df, UseSrc0, ExecutionSize, |
| 69 | + LetDeduceArgs>(Q, Print); |
| 70 | + Passed &= test<SystolicDepth, RepeatCount, df, df, !UseSrc0, ExecutionSize, |
| 71 | + LetDeduceArgs>(Q, Print); |
| 72 | + |
| 73 | + std::cout << (Passed ? "Test Passed\n" : "Test FAILED\n"); |
| 74 | + return Passed ? 0 : 1; |
| 75 | +} |
0 commit comments