diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 39e76310cd..9ad812d58d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -296,12 +296,61 @@ jobs: - name: Build all run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - - name: Dump binary dependents + - name: Show contents of bin directory working-directory: ${{github.workspace}}/build + run: ls ./bin/${{matrix.build_type}}/ + + - name: Show contents of lib directory + working-directory: ${{github.workspace}}/build + run: ls ./lib/${{matrix.build_type}}/ + + - name: Show contents of PATH env var + run: $Env:PATH + + - name: Append build bin and lib dir to PATH env + run: $env:PATH = "${{github.workspace}}/build/bin/${{matrix.build_type}};${{github.workspace}}/build/lib/${{matrix.build_type}};$env:PATH" + + - name: Check system32 dir + run: ls "C:\Windows\System32\" + + - name: Check VC tools dir + run: ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64\" + + - name: Check VC redist libs dir1 + run: ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.40.33807\debug_nonredist\x64\" + + - name: Check VC redist libs dir2 + run: ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.40.33807\debug_nonredist\x64\Microsoft.VC143.DebugCRT" + + - name: Check Windows Kits dir + run: ls "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.UniversalCRT.Debug\" + + - name: Show contents of PATH env var again + run: $Env:PATH + + - name: Dumpbin hello_world.exe output + working-directory: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/" + run: ./dumpbin.exe /DEPENDENTS ${{github.workspace}}/build/bin/${{matrix.build_type}}/hello_world.exe + + - name: Dumpbin ur_loader.dll output + working-directory: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/" + run: ./dumpbin.exe /DEPENDENTS ${{github.workspace}}/build/bin/${{matrix.build_type}}/ur_loader.dll + + - name: Dumpbin ze_loader.dll output + working-directory: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/" + run: ./dumpbin.exe /DEPENDENTS ${{github.workspace}}/build/bin/${{matrix.build_type}}/ze_loader.dll + + - name: Run hello_world.exe + working-directory: ${{github.workspace}}/build + run: $Env:ZEL_ENABLE_LOADER_LOGGING=1; ./bin/${{matrix.build_type}}/hello_world.exe + + - name: Run single failing test example-hello-world + working-directory: ${{github.workspace}}/build + run: $Env:ZEL_ENABLE_LOADER_LOGGING=1; ctest -R "example-hello" -C ${{matrix.build_type}} --verbose - name: Test working-directory: ${{github.workspace}}/build - run: $Env:UR_LOG_LEVEL_ZERO="level:info;output:stdout"; $Env:UR_LOG_LOADER="level:info;output:stdout"; ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace" --verbose + run: $Env:ZEL_ENABLE_LOADER_LOGGING=1; $Env:UR_LOG_LEVEL_ZERO="level:info;output:stdout"; $Env:UR_LOG_LOADER="level:info;output:stdout"; ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace" --verbose # macos-build: # name: Build - MacOS diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt index 8fd9bda19d..1b917966d6 100644 --- a/examples/hello_world/CMakeLists.txt +++ b/examples/hello_world/CMakeLists.txt @@ -15,6 +15,7 @@ if(MSVC) VS_DEBUGGER_COMMAND_ARGUMENTS "" VS_DEBUGGER_WORKING_DIRECTORY "$(OutDir)" ) + set_target_properties (${NAME} PROPERTIES PREFIX "../") endif() target_link_libraries(${TARGET_NAME} PRIVATE diff --git a/source/adapters/level_zero/CMakeLists.txt b/source/adapters/level_zero/CMakeLists.txt index 0158061f9d..ee20399679 100644 --- a/source/adapters/level_zero/CMakeLists.txt +++ b/source/adapters/level_zero/CMakeLists.txt @@ -81,7 +81,7 @@ get_filename_component(LEVEL_ZERO_LIBRARY_SRC "${LEVEL_ZERO_LIBRARY}" DIRECTORY) get_filename_component(LEVEL_ZERO_LIB_NAME "${LEVEL_ZERO_LIBRARY}" NAME) target_link_directories(LevelZeroLoader INTERFACE "$" - "$" + # "$" ) target_link_libraries(LevelZeroLoader INTERFACE "${LEVEL_ZERO_LIB_NAME}" @@ -90,7 +90,7 @@ target_link_libraries(LevelZeroLoader add_library (LevelZeroLoader-Headers INTERFACE) target_include_directories(LevelZeroLoader-Headers INTERFACE "$" - "$" + # "$" ) if(UR_BUILD_ADAPTER_L0) diff --git a/source/common/windows/ur_lib_loader.cpp b/source/common/windows/ur_lib_loader.cpp index f062cfc560..39110501b7 100644 --- a/source/common/windows/ur_lib_loader.cpp +++ b/source/common/windows/ur_lib_loader.cpp @@ -27,9 +27,7 @@ void LibLoader::freeAdapterLibrary(HMODULE handle) { std::unique_ptr LibLoader::loadAdapterLibrary(const char *name) { - logger::info( - "Trying to load a library from {}", - name); + logger::info("Trying to load a library from {}", name); auto handle = std::unique_ptr( LoadLibraryExA(name, nullptr, 0)); logger::info("loaded adapter 0x{} ({})", handle, name); @@ -37,6 +35,7 @@ LibLoader::loadAdapterLibrary(const char *name) { } void *LibLoader::getFunctionPtr(HMODULE handle, const char *func_name) { + logger::info("Getting function ptr for {}", func_name); return reinterpret_cast(GetProcAddress(handle, func_name)); } diff --git a/source/loader/windows/adapter_search.cpp b/source/loader/windows/adapter_search.cpp index b514897d91..0097cf8139 100644 --- a/source/loader/windows/adapter_search.cpp +++ b/source/loader/windows/adapter_search.cpp @@ -25,7 +25,7 @@ namespace ur_loader { std::optional getLoaderLibPath() { HMODULE hModule = NULL; char pathStr[MAX_PATH_LEN_WIN]; - + logger::info("Getting loader library path!"); if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast(&getLoaderLibPath),