From 47d3505afe57d7d4bf0d5c659c21e3e4c19ff4c6 Mon Sep 17 00:00:00 2001 From: Kris Rowe Date: Mon, 9 Oct 2023 23:29:02 +0000 Subject: [PATCH] Concat user supplied flags. --- backends/sycl/ceed-sycl-compile.sycl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backends/sycl/ceed-sycl-compile.sycl.cpp b/backends/sycl/ceed-sycl-compile.sycl.cpp index 8ca1b0e1d1..9cf6f7057d 100644 --- a/backends/sycl/ceed-sycl-compile.sycl.cpp +++ b/backends/sycl/ceed-sycl-compile.sycl.cpp @@ -57,7 +57,11 @@ static int CeedJitAddDefinitions_Sycl(Ceed ceed, const std::string &kernel_sourc // TODO: Add architecture flags, optimization flags //------------------------------------------------------------------------------ static inline int CeedJitGetFlags_Sycl(std::vector &flags) { - flags = {std::string("-cl-std=CL3.0"), std::string("-Dint32_t=int")}; + flags = { + std::string("-cl-std=CL3.0"), + std::string("-cl-intel-enable-auto-large-GRF-mode"), + std::string("-Dint32_t=int") + }; return CEED_ERROR_SUCCESS; } @@ -107,7 +111,10 @@ static inline int CeedJitCompileSource_Sycl(Ceed ceed, const sycl::device &sycl_ } // Build a program executable - std::string all_flags = std::string("-cl-std=CL3.0 -cl-intel-enable-auto-large-GRF-mode -Dint32_t=int"); + std::string all_flags; + for (const auto& flag : flags) { + all_flags += flag + " "; + } opencl_error = clBuildProgram( opencl_program,