2
2
#include " ur_mock_helpers.hpp"
3
3
#include < sycl/sycl.hpp>
4
4
5
+ #include < helpers/MockDeviceImage.hpp>
5
6
#include < helpers/MockKernelInfo.hpp>
6
7
#include < helpers/RuntimeLinkingCommon.hpp>
7
- #include < helpers/UrImage.hpp>
8
8
#include < helpers/UrMock.hpp>
9
9
10
10
#include < gtest/gtest.h>
@@ -46,11 +46,11 @@ KERNEL_INFO(KernelG)
46
46
} // namespace _V1
47
47
} // namespace sycl
48
48
49
- static sycl::unittest::UrImage
49
+ static sycl::unittest::MockDeviceImage
50
50
generateImage (std::initializer_list<std::string> KernelNames,
51
51
const std::string &VFSets, bool UsesVFSets, unsigned char Magic) {
52
- sycl::unittest::UrPropertySet PropSet;
53
- std::vector<sycl::unittest::UrProperty > Props;
52
+ sycl::unittest::MockPropertySet PropSet;
53
+ std::vector<sycl::unittest::MockProperty > Props;
54
54
uint64_t PropSize = VFSets.size ();
55
55
std::vector<char > Storage (/* bytes for size */ 8 + PropSize +
56
56
/* null terminator */ 1 );
@@ -61,18 +61,18 @@ generateImage(std::initializer_list<std::string> KernelNames,
61
61
Storage.back () = ' \0 ' ;
62
62
const std::string PropName =
63
63
UsesVFSets ? " uses-virtual-functions-set" : " virtual-functions-set" ;
64
- sycl::unittest::UrProperty Prop (PropName, Storage,
65
- SYCL_PROPERTY_TYPE_BYTE_ARRAY);
64
+ sycl::unittest::MockProperty Prop (PropName, Storage,
65
+ SYCL_PROPERTY_TYPE_BYTE_ARRAY);
66
66
67
67
Props.push_back (Prop);
68
68
PropSet.insert (__SYCL_PROPERTY_SET_SYCL_VIRTUAL_FUNCTIONS, std::move (Props));
69
69
70
70
std::vector<unsigned char > Bin{Magic};
71
71
72
- std::vector<sycl::unittest::UrOffloadEntry > Entries =
72
+ std::vector<sycl::unittest::MockOffloadEntry > Entries =
73
73
sycl::unittest::makeEmptyKernels (KernelNames);
74
74
75
- sycl::unittest::UrImage Img{
75
+ sycl::unittest::MockDeviceImage Img{
76
76
SYCL_DEVICE_BINARY_TYPE_SPIRV, // Format
77
77
__SYCL_DEVICE_BINARY_TARGET_SPIRV64, // DeviceTargetSpec
78
78
" " , // Compile options
@@ -103,7 +103,7 @@ static constexpr unsigned PROGRAM_F1 = 53;
103
103
// Device images with no entires are ignored by SYCL RT during registration.
104
104
// Therefore, we have to provide some kernel names to make the test work, even
105
105
// if we don't really have them/use them.
106
- static sycl::unittest::UrImage Imgs[] = {
106
+ static sycl::unittest::MockDeviceImage Imgs[] = {
107
107
generateImage ({" KernelA" }, " set-a" , /* uses vf set */ true , PROGRAM_A),
108
108
generateImage ({" DummyKernel0" }, " set-a" , /* provides vf set */ false ,
109
109
PROGRAM_A0),
@@ -131,7 +131,7 @@ static sycl::unittest::UrImage Imgs[] = {
131
131
generateImage ({" KernelG" }, " set-f" , /* uses vf set */ true , PROGRAM_F1)};
132
132
133
133
// Registers mock devices images in the SYCL RT
134
- static sycl::unittest::UrImageArray <15 > ImgArray{Imgs};
134
+ static sycl::unittest::MockDeviceImageArray <15 > ImgArray{Imgs};
135
135
136
136
TEST (VirtualFunctions, SingleKernelUsesSingleVFSet) {
137
137
sycl::unittest::UrMock<> Mock;
0 commit comments