From 76999788902a8c50e8e5d0e867763e5ea2f10042 Mon Sep 17 00:00:00 2001 From: kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:54:10 -0500 Subject: Feature/record unit test (#4910) * Fix the slang-test bug Since we reorganize the build directory, now the libraries are located at different directory with executables in non-Windows platform, we have to change the code on how to find the dll directory. * Integrate the record/replay test into slang-unit-test We create a unit-test-record-replay.cpp to run the converted slang examples in child process as our tests for the record-replay layer. * Disable the test on Apple Due to the limitation of current examples, we temporarily disable them on apples. Change the ci to make this test only be run on the gpu-equipped runners, for other runners we add a white-list file "expected-failure-record-replay-tests.txt". * Remove 'hello-world' example from unit test "hello-world" doesn't use gfx abstract library, instead it uses vk directly, it's not a preferable way. So we will drop this test, instead, we will use cpu-hello-world example. --- examples/hello-world/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'examples/hello-world/main.cpp') diff --git a/examples/hello-world/main.cpp b/examples/hello-world/main.cpp index 87d440901..526ab1a2a 100644 --- a/examples/hello-world/main.cpp +++ b/examples/hello-world/main.cpp @@ -70,6 +70,7 @@ struct HelloWorldExample : public TestBase int main(int argc, char* argv[]) { + fprintf(stdout, "Hello, world! Entry Point\n"); initDebugCallback(); HelloWorldExample example; example.parseOption(argc, argv); @@ -83,10 +84,19 @@ int main(int argc, char* argv[]) int HelloWorldExample::run() { RETURN_ON_FAIL(initVulkanInstanceAndDevice()); + fprintf(stdout, "initVulkanInstanceAndDevice done\n"); + RETURN_ON_FAIL(createComputePipelineFromShader()); + fprintf(stdout, "createComputePipelineFromShader done\n"); + RETURN_ON_FAIL(createInOutBuffers()); + fprintf(stdout, "createInOutBuffers done\n"); + RETURN_ON_FAIL(dispatchCompute()); + fprintf(stdout, "dispatchCompute done\n"); + RETURN_ON_FAIL(printComputeResults()); + fprintf(stdout, "printComputeResults done\n"); return 0; } -- cgit v1.2.3