From 6d27b9ed4961eb3c04756cf060e34834ce04eeab Mon Sep 17 00:00:00 2001 From: Dmitry Vodopyanov Date: Sat, 17 Jul 2021 13:17:18 +0300 Subject: [PATCH] [SYCL] Fix ONEAPI::online_compiler impl after #4014 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 &`: now correct `ONEAPI::online_compiler &` returns instead of wrong `ext::intel::online_compiler &` --- .../sycl/ext/intel/online_compiler.hpp | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sycl/include/sycl/ext/intel/online_compiler.hpp b/sycl/include/sycl/ext/intel/online_compiler.hpp index 55863b9334566..ef104f3dd9e97 100644 --- a/sycl/include/sycl/ext/intel/online_compiler.hpp +++ b/sycl/include/sycl/ext/intel/online_compiler.hpp @@ -274,46 +274,47 @@ namespace __SYCL2020_DEPRECATED("use 'ext::intel' instead") INTEL { /// *this. online_compiler & setOutputFormat(ext::intel::compiled_code_format fmt) { - return MOnlineCompiler.setOutputFormat<(ext::intel::source_language)Lang>( - fmt); + MOnlineCompiler.setOutputFormat(fmt); + return *this; } /// Sets the compiled code format version of the compilation target and /// returns *this. online_compiler &setOutputFormatVersion(int major, int minor) { - return MOnlineCompiler - .setOutputFormatVersion<(ext::intel::source_language)Lang>(major, - minor); + MOnlineCompiler.setOutputFormatVersion(major, minor); + return *this; } /// Sets the device type of the compilation target and returns *this. online_compiler &setTargetDeviceType(sycl::info::device_type type) { - return MOnlineCompiler - .setTargetDeviceType<(ext::intel::source_language)Lang>(type); + MOnlineCompiler.setTargetDeviceType(type); + return *this; } /// Sets the device architecture of the compilation target and returns /// *this. online_compiler &setTargetDeviceArch(device_arch arch) { - return MOnlineCompiler - .setTargetDeviceArch<(ext::intel::source_language)Lang>(arch); + MOnlineCompiler.setTargetDeviceArch(arch); + return *this; } /// Makes the compilation target 32-bit and returns *this. online_compiler &set32bitTarget() { - return MOnlineCompiler.set32bitTarget(); + MOnlineCompiler.set32bitTarget(); + return *this; }; /// Makes the compilation target 64-bit and returns *this. online_compiler &set64bitTarget() { - return MOnlineCompiler.set64bitTarget(); + MOnlineCompiler.set64bitTarget(); + return *this; }; /// Sets implementation-defined target device stepping of the compilation /// target and returns *this. online_compiler &setTargetDeviceStepping(const std::string &id) { - return MOnlineCompiler - .setTargetDeviceStepping<(ext::intel::source_language)Lang>(id); + MOnlineCompiler.setTargetDeviceStepping(id); + return *this; } private: