commit | 6894b536059ffe37929df555f70507147c0bbc84 | [log] [tgz] |
---|---|---|
author | Nikhil Joshi <nikhilj@nvidia.com> | Tue May 21 15:58:18 2019 +0530 |
committer | Nikhil Joshi <nikhilj@nvidia.com> | Tue May 21 17:18:58 2019 +0530 |
tree | 20dd466f45976092472eea2dbe12a9536ebdb857 | |
parent | 89138ca457aa27ac51bddb807ca8947b39278147 [diff] |
Use QueryAdapter APIs as per MS directives Update ICD loader to use QueryAdapter APIs as per MS directives for paravirtualization. Merge branch 'skudchad-ocl-wddm24' of https://github.com/BKlamik-MSFT/OpenCL-ICD-Loader
The build system will build ICD Loader library (OpenCL.dll or libOpenCL.so), the ICD Loader Test binary (icd_loader_test), and some helper libraries for the test.
Run “make”
Install recent Windows WDK, for access to d3dkmthk.h Currently at https://docs.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk
Establish environment variable WDK to include directory Ex: set WDK=C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0
Modify environment for your compiler. Ex: Command line builds should modify “build_using_cmake.bat” Ex: Visual Studio CMake integration should modify the “buildRoot” to match the BUILD_DIR in “build_using_cmake.bat”
Build either using the command line to run “build_using_cmake.bat” or with Visual Studio CMake integration
The ICD Test can be run using ctest, which is a companion to cmake. It can also be run directly by executing icd_loader_test(.exe) executable from the bin folder.
Add driver stub as an ICD echo full/path/to/libOpenCLDriverStub.so > /etc/OpenCL/vendors/test.icd
Run test using ctest make test
Add driver stub as an ICD by adding appropriate registry value Key for 32-bit apps: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Khronos\OpenCL\Vendors Key for 64-bit apps: HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors
Add a REG_DWORD value: Name: c:/full/path/to/OpenCLDriverStub.dll Data: 0
Note: The build_using_cmake.bat builds ICD test as a 32-bit binary.
Run test using ctest.exe cd build ctest.exe
Manually remove the registry key or .icd files added for running the ICD test.
The “build” and “bin” folders are autogenerated by the build so those may be safely deleted without losing any source code (on Linux “make clobber” will delete them).