[Beignet] [PATCH 1/6] Debug Support: Enable new feature
Bai Yannan
yannan.bai at intel.com
Sun Nov 1 18:43:17 PST 2015
Add a bool env OCL_PROFILING to enable generate debug infomation while compiling cl source, set it as false by default.
Signed-off-by: Yannan Bai <yannan.bai at intel.com>
---
backend/src/backend/program.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
index 472734b..7338c75 100644
--- a/backend/src/backend/program.cpp
+++ b/backend/src/backend/program.cpp
@@ -515,6 +515,7 @@ namespace gbe {
program->CleanLlvmResource();
}
+ BVAR(OCL_PROFILING, false);
#ifdef GBE_COMPILER_AVAILABLE
BVAR(OCL_OUTPUT_BUILD_LOG, false);
@@ -553,6 +554,7 @@ namespace gbe {
#endif /* LLVM_VERSION_MINOR <= 2 */
args.push_back("stringInput.cl");
args.push_back("-ffp-contract=off");
+ if(OCL_PROFILING) args.push_back("-g");
// The compiler invocation needs a DiagnosticsEngine so it can report problems
std::string ErrorString;
--
1.9.1
More information about the Beignet
mailing list