Skip to content

Conversation

@axsaucedo
Copy link
Member

No description provided.

- Replace malloc/free with std::vector<uint8_t> in Algorithm and OpAlgoDispatch
  - mPushConstantsData and mSpecializationConstantsData now use RAII
  - Eliminates memory leak potential and simplifies resource management
- Remove redundant null checks in Algorithm::destroy() that were always false
- Remove commented-out code blocks and add clear documentation
- Improve virtual destructor in Memory base class (use = default)
- Fix potential dangling pointer risk in Manager.cpp environment parsing
  - Add reserve() call to prevent vector reallocation
  - Add comments documenting lifetime requirements
- Add .venv to .gitignore

All 106 tests pass.
- Add noexcept to Tensor and Image destructors for proper STL container behavior
- Fix 'phyisical' typo to 'physical' in error messages
- Fix 'Kompose' typo to 'Kompute' throughout codebase (13 occurrences)
- Remove duplicate cmake_minimum_required in src/CMakeLists.txt
- Define KP_MAX_IMAGE_CHANNELS constant to replace magic number
  - Documents why 3-channel images are not supported (Metal/Mesa limitation)

All 106 tests pass.
- Fix uninitialized mQueueIndex member variable (Task 1.3)
  - Replace implicit -1 to uint32_t conversion with explicit
    std::numeric_limits<uint32_t>::max() sentinel value
  - Add <limits> include for proper usage
  - Document the sentinel value purpose with comments

- Update GoogleTest from release-1.11.0 to v1.14.0 (Task 5.1)
  - Resolves CMake deprecation warnings
  - Uses latest stable release

- Add edge case tests for Tensor (Task 6.2)
  - ZeroSizedTensorFromData: verify zero-sized tensors throw exception
  - TensorDestroyMultipleCalls: verify multiple destroy calls are safe
  - TensorAccessAfterSync: verify data integrity after sync operations

All 110 tests pass (excluding known platform-specific failures).
Add comprehensive edge case tests bundled by component for efficiency:

TestAlgorithmEdgeCases (2 tests):
- EmptySpirvCreatesUninitializedAlgorithm: verify deferred shader behavior
- AlgorithmDestroyMultipleCalls: verify multiple destroy calls are safe

TestSequenceEdgeCases (3 tests):
- SequenceDestroyMultipleCalls: verify multiple destroy calls are safe
- SequenceClearWhileRecording: verify clear resets recording state
- SequenceRerecordAfterEval: verify sequences can be rerecorded

TestImageEdgeCases (3 tests):
- ZeroSizedImageCreation: verify zero-sized images throw exception
- ImageDestroyMultipleCalls: verify multiple destroy calls are safe
- ImageAccessAfterSync: verify data integrity after sync operations

Note: Invalid SPIRV tests are skipped as MoltenVK on macOS crashes
instead of throwing catchable exceptions for invalid shader bytecode.

All 118 tests pass (excluding known platform-specific failures).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants