mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 06:49:02 +00:00
Save Kernel Sources to Disk - Infrastructure Change (#412)
* Introduces the ability to capture the kernel sources and the build options used by the conformance tests to a .cl and .options files. This is achieved via a new compilation cache mode called dump-cl-files. Files will be generated to the folder pointed by the compilation cache path. When a conformance test is executed with dump-cl-files cache mode and online compilation mode, the files will be saved to the disk and the regular execution flow of the conformance continues uninterrupted. When a conformance test is executed with dump-cl-files cache mode and binary or spir-v compilation mode, the files will be saved to the disk as well, however the compilation will fail - leading to a failure in all test cases. * Introduces the ability to capture the kernel sources and the build options used by the conformance tests to a .cl and .options files. This is achieved via a new compilation cache mode called dump-cl-files. Files will be generated to the folder pointed by the compilation cache path. When a conformance test is executed with dump-cl-files cache mode and online compilation mode, the files will be saved to the disk and the regular execution flow of the conformance continues uninterrupted. When a conformance test is executed with dump-cl-files cache mode and binary or spir-v compilation mode, the files will be saved to the disk as well, however the compilation will fail - leading to a failure in all test cases. * merged with latest CTS code
This commit is contained in:
@@ -47,8 +47,9 @@ void helpInfo ()
|
||||
" --compilation-cache-mode <cache-mode> Specify a compilation caching mode:\n"
|
||||
" compile-if-absent Read from cache if already populated, or\n"
|
||||
" else perform offline compilation (default)\n"
|
||||
" force-read Force reading from the cache\n"
|
||||
" overwrite Disable reading from the cache\n"
|
||||
" force-read Force reading from the cache\n"
|
||||
" overwrite Disable reading from the cache\n"
|
||||
" dump-cl-files Dumps the .cl and build .options files used by the test suite\n"
|
||||
" --compilation-cache-path <path> Path for offline compiler output and CL source\n"
|
||||
" --compilation-program <prog> Program to use for offline compilation,\n"
|
||||
" defaults to " DEFAULT_COMPILATION_PROGRAM "\n"
|
||||
@@ -135,6 +136,10 @@ int parseCustomParam (int argc, const char *argv[], const char *ignore)
|
||||
{
|
||||
gCompilationCacheMode = kCacheModeOverwrite;
|
||||
}
|
||||
else if (!strcmp(mode, "dump-cl-files"))
|
||||
{
|
||||
gCompilationCacheMode = kCacheModeDumpCl;
|
||||
}
|
||||
else
|
||||
{
|
||||
log_error("Compilation cache mode not recognized: %s\n", mode);
|
||||
@@ -185,7 +190,8 @@ int parseCustomParam (int argc, const char *argv[], const char *ignore)
|
||||
i -= delArg;
|
||||
}
|
||||
|
||||
if (gCompilationCacheMode != kCacheModeCompileIfAbsent && gCompilationMode == kOnline)
|
||||
if ((gCompilationCacheMode == kCacheModeForceRead || gCompilationCacheMode == kCacheModeOverwrite)
|
||||
&& gCompilationMode == kOnline)
|
||||
{
|
||||
log_error("Compilation cache mode can only be specified when using an offline compilation mode.\n");
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user