SWDEV-1 - OpenCL binary substituion feature based on source program text hash matching.
This patch allows to substitute binary for the opencl program. It supposed to be used as:
1. Run the opencl program with -save-temps.
2. Open the cl temp and find the following text in the program header:
Hash to override:
Source: 0xd66bcfa20e69e605
Source + clang options: 0x656a9dd8aedcbfb6
3. Create config file (ascii text) with a pair(s):
<hash> <path_to_binary_to_substitute>
where hash is the hex value from step 2 (without leading 0x), you can use either hash
depending on what you're going to match:
only the source text of the program or along with it's clang options.
4. Set the env variable AMD_OCL_SUBST_OBJFILE to the path of your config file.
5. Rerun the opencl program.
Change-Id: I977c80fe529ea14458194918c6ddfbe2de6a8857
Tá an tiomantas seo le fáil i:
tiomanta ag
Maneesh Gupta
tuismitheoir
2e26ed1cbb
tiomantas
51cc9c2f8c
@@ -457,6 +457,10 @@ class Program : public amd::HeapObject {
|
||||
bool createKernelMetadataMap();
|
||||
#endif
|
||||
|
||||
bool trySubstObjFile(const char *SubstCfgFile,
|
||||
const std::string& sourceCode,
|
||||
const amd::option::Options* options);
|
||||
|
||||
//! Disable default copy constructor
|
||||
Program(const Program&);
|
||||
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir