@@ -75,7 +75,7 @@ createOpenCLInterOpProgram(const context &SyclCtx,
75
75
const char *CompileOpts)
76
76
{
77
77
cl_int err;
78
- auto CLCtx = SyclCtx. get ( );
78
+ auto CLCtx = get_native<backend::opencl>(SyclCtx );
79
79
auto CLProgram = clCreateProgramWithIL (CLCtx, IL, length, &err);
80
80
if (err) {
81
81
// \todo: record the error string and any other information.
@@ -89,7 +89,7 @@ createOpenCLInterOpProgram(const context &SyclCtx,
89
89
// Get a list of CL Devices from the Sycl devices
90
90
auto CLDevices = new cl_device_id[SyclDevices.size ()];
91
91
for (auto i = 0ul ; i < SyclDevices.size (); ++i)
92
- CLDevices[i] = SyclDevices[i]. get ( );
92
+ CLDevices[i] = get_native<backend::opencl>( SyclDevices[i]);
93
93
94
94
// Build the OpenCL interoperability program
95
95
err = clBuildProgram (CLProgram, (cl_uint)(SyclDevices.size ()), CLDevices,
@@ -138,7 +138,7 @@ createLevelZeroInterOpProgram(const context &SyclCtx,
138
138
size_t length,
139
139
const char *CompileOpts)
140
140
{
141
- auto ZeCtx = SyclCtx. get_native <backend::level_zero>();
141
+ auto ZeCtx = get_native<backend::level_zero>(SyclCtx );
142
142
auto SyclDevices = SyclCtx.get_devices ();
143
143
if (SyclDevices.size () > 1 ) {
144
144
std::cerr << " Level zero program can be created for only one device.\n " ;
@@ -159,7 +159,7 @@ createLevelZeroInterOpProgram(const context &SyclCtx,
159
159
ZeModuleDesc.pBuildFlags = CompileOpts;
160
160
ZeModuleDesc.pConstants = &ZeSpecConstants;
161
161
162
- auto ZeDevice = SyclDevices[ 0 ]. get_native <backend::level_zero>();
162
+ auto ZeDevice = get_native<backend::level_zero>(SyclDevices[ 0 ] );
163
163
ze_module_handle_t ZeModule;
164
164
165
165
auto stZeModuleCreateF = getZeModuleCreateFn ();
0 commit comments