Skip to content

Commit ea4b8a9

Browse files
[SYCL] Fix ONEAPI::online_compiler impl after #4014 (#4128)
This patch fixes implementation of ONEAPI::online_compiler class after PR #4014: * fix post-commit failure in SharedLibs caused by extra syntax operations: https://github.com/intel/llvm/runs/3091963555 * fix return type for functions which return `online_compiler<Lang> &`: now correct `ONEAPI::online_compiler<Lang> &` returns instead of wrong `ext::intel::online_compiler<Lang> &`
1 parent d703f57 commit ea4b8a9

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

sycl/include/sycl/ext/intel/online_compiler.hpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,46 +274,47 @@ namespace __SYCL2020_DEPRECATED("use 'ext::intel' instead") INTEL {
274274
/// *this.
275275
online_compiler<Lang> &
276276
setOutputFormat(ext::intel::compiled_code_format fmt) {
277-
return MOnlineCompiler.setOutputFormat<(ext::intel::source_language)Lang>(
278-
fmt);
277+
MOnlineCompiler.setOutputFormat(fmt);
278+
return *this;
279279
}
280280

281281
/// Sets the compiled code format version of the compilation target and
282282
/// returns *this.
283283
online_compiler<Lang> &setOutputFormatVersion(int major, int minor) {
284-
return MOnlineCompiler
285-
.setOutputFormatVersion<(ext::intel::source_language)Lang>(major,
286-
minor);
284+
MOnlineCompiler.setOutputFormatVersion(major, minor);
285+
return *this;
287286
}
288287

289288
/// Sets the device type of the compilation target and returns *this.
290289
online_compiler<Lang> &setTargetDeviceType(sycl::info::device_type type) {
291-
return MOnlineCompiler
292-
.setTargetDeviceType<(ext::intel::source_language)Lang>(type);
290+
MOnlineCompiler.setTargetDeviceType(type);
291+
return *this;
293292
}
294293

295294
/// Sets the device architecture of the compilation target and returns
296295
/// *this.
297296
online_compiler<Lang> &setTargetDeviceArch(device_arch arch) {
298-
return MOnlineCompiler
299-
.setTargetDeviceArch<(ext::intel::source_language)Lang>(arch);
297+
MOnlineCompiler.setTargetDeviceArch(arch);
298+
return *this;
300299
}
301300

302301
/// Makes the compilation target 32-bit and returns *this.
303302
online_compiler<Lang> &set32bitTarget() {
304-
return MOnlineCompiler.set32bitTarget();
303+
MOnlineCompiler.set32bitTarget();
304+
return *this;
305305
};
306306

307307
/// Makes the compilation target 64-bit and returns *this.
308308
online_compiler<Lang> &set64bitTarget() {
309-
return MOnlineCompiler.set64bitTarget();
309+
MOnlineCompiler.set64bitTarget();
310+
return *this;
310311
};
311312

312313
/// Sets implementation-defined target device stepping of the compilation
313314
/// target and returns *this.
314315
online_compiler<Lang> &setTargetDeviceStepping(const std::string &id) {
315-
return MOnlineCompiler
316-
.setTargetDeviceStepping<(ext::intel::source_language)Lang>(id);
316+
MOnlineCompiler.setTargetDeviceStepping(id);
317+
return *this;
317318
}
318319

319320
private:

0 commit comments

Comments
 (0)