Skip to content

Commit

Permalink
Concat user supplied flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-rowe committed Oct 9, 2023
1 parent 017edb8 commit 47d3505
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions backends/sycl/ceed-sycl-compile.sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> &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;
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 47d3505

Please sign in to comment.