Skip to content

Commit

Permalink
...debug novulkan cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
ichinii committed Aug 1, 2024
1 parent 7c8b60a commit 545d03c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 24 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/testUbuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Update all submodules
run: |
git submodule sync
git submodule update --init --recursive
with:
submodules: 'recursive'

- name: Make some space
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/testUbuntuClang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Update all submodules
run: |
git submodule sync
git submodule update --init --recursive
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
run: |
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/testWindows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ name: testWindows
on: [push, pull_request]

env:
BUILD_TYPE: Release
BUILD_TYPE: Debug

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Update all submodules
run: |
git submodule sync
git submodule update --init --recursive
with:
submodules: 'recursive'

# - name: Prepare Vulkan SDK
# uses: humbletim/[email protected]
Expand Down Expand Up @@ -62,11 +59,15 @@ jobs:
run: |
type "${{github.workspace}}/build/CMakeCache.txt"
echo "D:\a\rayx\rayx\vcpkg\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build --target rayx --config ${{env.BUILD_TYPE}}
# - name: Test
# working-directory: ${{github.workspace}}/build/bin/release
# run: ./rayx-core-tst -x

- name: Test
working-directory: ${{github.workspace}}/build/bin/release
run: ./rayx-core-tst -x
- name: Run
working-directory: ${{github.workspace}}/build/bin/debug
run: ./rayx -m 6 -x -i "${{github.workspace}}/Scripts/benchmark-inputs/ReflectionZonePlateDefault200Toroid.rml"

- name: CPack
run: |
Expand Down
2 changes: 1 addition & 1 deletion Intern/rayx-core/src/Shader/Throw.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
// TODO(Sven): rethink error handling. just instantly terminate with RAYX_ERR or use recordFinalEvent?
// #define _throw(string) recordFinalEvent(_ray, ETYPE_FATAL_ERROR)
// #define _throw(string) RAYX_ERR << string
#define _throw(string) assert(false)
#define _throw(string) printf("Error occurred while executing shader: %s\n", string); assert(false)
// #endif
6 changes: 5 additions & 1 deletion Intern/rayx-core/tests/setupTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ inline void add_failure() { ADD_FAILURE(); }
class TestSuite : public testing::Test {
protected:
static void SetUpTestSuite() {
RAYX_LOG << "SetUpTestSuite";
RAYX::error_fn = add_failure;

bool cpu = false;
Expand All @@ -163,13 +164,16 @@ class TestSuite : public testing::Test {
}

// Choose Hardware
RAYX_LOG << "SetUpTestSuite create tracer";
RAYX_LOG << "cpu: " << cpu;
using DeviceType = RAYX::DeviceConfig::DeviceType;
const auto deviceType = cpu ? DeviceType::Cpu : DeviceType::Gpu;
tracer = std::make_unique<RAYX::Tracer>(RAYX::DeviceConfig(deviceType).enableBestDevice());
RAYX_LOG << "SetUpTestSuite created tracer";
}

// called before every test invocation.
void SetUp() override { RAYX::fixSeed(RAYX::FIXED_SEED); }
void SetUp() override { RAYX_LOG << "START"; RAYX::fixSeed(RAYX::FIXED_SEED); }

static void TearDownTestSuite() { tracer = nullptr; }
};
Expand Down
2 changes: 1 addition & 1 deletion Intern/rayx/src/CommandParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CommandParser::CommandParser(int _argc, char* const* _argv) : m_cli11{std::make_
} catch (const CLI::ParseError& e) {
m_cli11_return = m_cli11->exit(e);
if ((e.get_name() == "CallForHelp") || (e.get_name() == "CallForAllHelp"))
exit(1);
RAYX_ERR << "CLI ERROR: unknown error";
else
RAYX_D_ERR << "CLI ERROR" << m_cli11_return << " " << e.get_name();
}
Expand Down

0 comments on commit 545d03c

Please sign in to comment.