Files
compute-runtime/opencl/test/unit_test/helpers/hardware_commands_helper_tests.h
Kacper Nowak bac3c93e45 refactor(opencl/gtpin): Extend OCL/GTPin interface for stateless kernels
Remove blocking condition disallowing GTPin instrumentation using OCL interface
for stateless kernels (where SSH size == 0). It is required in order to
reintroduce support for GTPin on platforms supporting stateless
addressing model only.
- Always allow for adding surface state for GTPin use, even if kernel
SSH size == 0,
- Correct addSurfaceState function logic
- Remove and/or modify GTPin unit tests based on previous approach
- Wrap logic for pushing BT and SSH into separate function
- Minor code refactor; remove not needed test function

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
2023-03-23 13:14:16 +01:00

49 lines
1.4 KiB
C++

/*
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/built_ins/built_ins.h"
#include "shared/source/command_container/encode_surface_state.h"
#include "shared/test/common/mocks/mock_graphics_allocation.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "opencl/source/kernel/kernel.h"
#include "opencl/test/unit_test/fixtures/built_in_fixture.h"
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
#include "opencl/test/unit_test/fixtures/context_fixture.h"
#include "opencl/test/unit_test/mocks/mock_context.h"
#include "opencl/test/unit_test/mocks/mock_kernel.h"
#include "opencl/test/unit_test/mocks/mock_program.h"
#include "gtest/gtest.h"
#include <memory>
using namespace NEO;
struct HardwareCommandsTest : ClDeviceFixture,
ContextFixture,
BuiltInFixture,
::testing::Test {
using BuiltInFixture::setUp;
using ContextFixture::setUp;
void SetUp() override;
void TearDown() override;
void addSpaceForSingleKernelArg();
size_t sizeRequiredCS;
size_t sizeRequiredISH;
std::unique_ptr<MockKernelWithInternals> mockKernelWithInternal;
Kernel::SimpleKernelArgInfo kernelArgInfo = {};
std::vector<Kernel::SimpleKernelArgInfo> kernelArguments;
};