Conversation
Co-authored-by: mldiego <39501815+mldiego@users.noreply.github.com>
Co-authored-by: mldiego <39501815+mldiego@users.noreply.github.com>
…nd HardSigmoidLayer Co-authored-by: mldiego <39501815+mldiego@users.noreply.github.com>
…oncatenationLayer Co-authored-by: mldiego <39501815+mldiego@users.noreply.github.com>
…utLayer, and PixelClassificationLayer Co-authored-by: mldiego <39501815+mldiego@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Can you create unit and integration tests for every layer and function in the endine directory?
Add comprehensive unit and integration tests for engine/nn layers and functions
Oct 3, 2025
mldiego
approved these changes
Oct 3, 2025
Merging latest changes before copilot tests
Refactor Star initialization by removing unnecessary parameters.
Removed tests for AdditionLayer with ImageZono inputs.
Removed test for ConcatenationLayer with Star inputs.
Removed test case for DepthConcatenationLayer with ImageStar inputs.
Updated assertions for output dimensions in FlattenLayer tests and removed obsolete ImageZono test.
The ones still failing is due to code bugs/errors, will fix those in the future
Removed precision conversion for Max and Min parameters.
Removed test for DepthConcatenationLayer with ImageZono inputs.
Removed the 'option' parameter from the reach_star_approx method call.
Update dimension retrieval in reach_star_single_input function to use in_set.
Removed tests for HardSigmoidLayer with ImageStar and Star inputs.
Removed assertions for result classes and output type.
Removed test case for ReshapeLayer with -1 in targetDim.
Updated test for SequenceInputLayer to use ImageStar instead of Box.
Commented out assertions and added print statements to check output sizes.
Updated the test for SaturatingLinearSymmLayer to use Star input instead of ImageStar with scaled images.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements comprehensive unit and integration test coverage for layers and functions in the
code/nnv/engine/nndirectory, addressing the request to create tests for "every layer and function in the engine directory."What's New
Created 19 new test files containing ~185 unit tests with ~5,900 lines of test code, achieving:
Tests Added
Functions (2/2 - 100% Complete)
Layers (19 layers completed)
Activation Layers:
Input Layers:
Structural Layers:
Test Coverage Details
Each test suite comprehensively validates:
evaluate()andevaluateSequence()methods with various input typestoGPU()functionalitychangeParamsPrecision()for single/double precisionTesting Philosophy
Minimal Changes:
todo_test.mfiles with actual testsConsistency:
test_<LayerName>.mruntests('test_<LayerName>')Example Test Usage
What's Not Included
Remaining TODO Layers (11) - Complex layers requiring additional dependencies:
Layers Without Test Directories (11) - Would require creating new test directories:
These can be addressed in future PRs as needed.
Impact
This PR significantly improves test coverage for the NNV engine directory, providing:
All tests follow minimal change principles and maintain consistency with the existing codebase.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.