-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I 73 #2
base: main
Are you sure you want to change the base?
I 73 #2
Conversation
WalkthroughThe project underwent significant restructuring, moving core implementations from Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant Engine
participant Logger
participant Util
User->>Engine: buildLoadNetwork(onnxModelPath, subVals, divVals, normalize)
Engine->>Logger: log("Building network...")
Engine->>Util: doesFileExist(onnxModelPath)
Util-->>Engine: fileExists
Engine->>Engine: build(onnxModelPath, subVals, divVals, normalize)
Engine->>Logger: log("Network built successfully")
User->>Engine: runInference(inputData)
Engine->>Logger: log("Running inference...")
Engine->>Engine: preprocess(inputData)
Engine->>Engine: executeInference(preprocessedData)
Engine->>Engine: postprocess(inferenceResults)
Engine-->>User: inferenceResults
Engine->>Logger: log("Inference completed")
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (14)
- CMakeLists.txt (1 hunks)
- README.md (1 hunks)
- include/Int8Calibrator.h (1 hunks)
- include/engine/EngineBuildLoadNetwork.inl (1 hunks)
- include/engine/EngineRunInference.inl (1 hunks)
- include/engine/EngineUtilities.inl (1 hunks)
- include/logger.h (1 hunks)
- include/macros.h (1 hunks)
- include/util/Stopwatch.h (1 hunks)
- include/util/Util.h (1 hunks)
- include/util/Util.inl (1 hunks)
- src/engine.cpp (1 hunks)
- src/engine.h (4 hunks)
- src/logger.cpp (3 hunks)
Files not reviewed due to errors (8)
- include/util/Util.h (no review received)
- include/util/Stopwatch.h (no review received)
- include/macros.h (no review received)
- include/util/Util.inl (no review received)
- CMakeLists.txt (no review received)
- include/engine/EngineRunInference.inl (no review received)
- include/engine/EngineUtilities.inl (no review received)
- src/engine.h (no review received)
Additional context used
LanguageTool
README.md
[uncategorized] ~34-~34: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...tes how to use the TensorRT C++ API for high performance GPU inference on image data. It covers ...
[style] ~38-~38: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...pecify a simple optimization profile. - How to run FP32, FP16, or INT8 precision in...
[style] ~39-~39: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ..., FP16, or INT8 precision inference. - How to read / write data from / into GPU me...
[style] ~40-~40: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... GPU memory and work with GPU images. - How to use cuda stream to run async inferen...
[style] ~41-~41: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ync inference and later synchronize. - How to work with models with static and dyn...
[style] ~42-~42: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... with static and dynamic batch sizes. - How to work with models with single or mult...
[style] ~43-~43: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...th single or multiple output tensors. - How to work with models with multiple input...
[uncategorized] ~52-~52: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...your own onnx model for this sample code or you can download the sample model (see ...
[uncategorized] ~66-~66: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ts/`. - If you use the provided script and you have installed cuDNN to a non-stand...
[grammar] ~114-~114: The verb after “to” should be in the base form as part of the to-infinitive. A verb can take many forms, but the base form is always used in the to-infinitive.
Context: ...sing the YoloV8 model, it is advised to used the COCO validation dataset, which can ...
[duplication] ~121-~121: Possible typo: you repeated a word
Context: ...batch can fit in your GPU memory. ### Benchmarks Benchmarks run on RTX 3050 Ti Laptop GPU, 11th Gen...
[style] ~157-~157: The phrase ‘lots of’ might be wordy and overused. Consider using an alternative.
Context: ...ted ininclude/engine
. I have written lots of comments all throughout the code which ...
[uncategorized] ~157-~157: Possible missing comma found.
Context: ...ten lots of comments all throughout the code which should make it easy to understand...
[style] ~165-~165: Consider using a different verb to strengthen your wording.
Context: ...and re-run the application. This should give you more information on where exactly t...
[grammar] ~168-~168: It appears that an object is missing here.
Context: ...his project was helpful to you, I would appreciate if you could give it a star. That will ...
[uncategorized] ~168-~168: It appears that hyphens are missing in the adjective “up-to-date”.
Context: .... That will encourage me to ensure it's up to date and solve issues quickly. I also do con...
[uncategorized] ~199-~199: Use a comma before ‘but’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...if your model has been compiled for FP32 but you try running FP16 inference, it will...
[typographical] ~246-~246: It seems that a comma is missing.
Context: .../in/cyrus-behroozi/ ## Contributors ✨ Thanks goes to these wonderful people ([emoji ...
Markdownlint
README.md
38-38: Expected: 0 or 2; Actual: 1
Trailing spaces
40-40: Expected: 0 or 2; Actual: 1
Trailing spaces
52-52: Expected: 0 or 2; Actual: 1
Trailing spaces
69-69: Expected: 0 or 2; Actual: 1
Trailing spaces
83-83: Expected: 0 or 2; Actual: 1
Trailing spaces
86-86: Expected: 0 or 2; Actual: 1
Trailing spaces
92-92: Expected: 0 or 2; Actual: 5
Trailing spaces
101-101: Expected: 0 or 2; Actual: 1
Trailing spaces
103-103: Expected: 0 or 2; Actual: 1
Trailing spaces
109-109: Expected: 0 or 2; Actual: 1
Trailing spaces
110-110: Expected: 0 or 2; Actual: 1
Trailing spaces
113-113: Expected: 0 or 2; Actual: 1
Trailing spaces
117-117: Expected: 0 or 2; Actual: 1
Trailing spaces
119-119: Expected: 0 or 2; Actual: 1
Trailing spaces
134-134: Expected: 0 or 2; Actual: 1
Trailing spaces
157-157: Expected: 0 or 2; Actual: 1
Trailing spaces
158-158: Expected: 0 or 2; Actual: 1
Trailing spaces
168-168: Expected: 0 or 2; Actual: 1
Trailing spaces
198-198: Expected: 0 or 2; Actual: 1
Trailing spaces
200-200: Expected: 0 or 2; Actual: 1
Trailing spaces
213-213: Expected: 0 or 2; Actual: 1
Trailing spaces
214-214: Expected: 0 or 2; Actual: 1
Trailing spaces
220-220: Expected: 0 or 2; Actual: 1
Trailing spaces
224-224: Expected: 0 or 2; Actual: 1
Trailing spaces
234-234: Expected: 0 or 2; Actual: 1
Trailing spaces
210-210: Expected: 1; Actual: 2
Multiple consecutive blank lines
31-31: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
50-50: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
54-54: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
72-72: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
78-78: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
88-88: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
108-108: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
121-121: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
133-133: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
137-137: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
156-156: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
162-162: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
167-167: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines
104-104: null
Fenced code blocks should be surrounded by blank lines
138-138: null
Fenced code blocks should be surrounded by blank lines
35-35: null
Lists should be surrounded by blank lines
55-55: null
Lists should be surrounded by blank lines
73-73: null
Lists should be surrounded by blank lines
79-79: null
Lists should be surrounded by blank lines
89-89: null
Lists should be surrounded by blank lines
103-103: null
Lists should be surrounded by blank lines
112-112: null
Lists should be surrounded by blank lines
157-157: null
Lists should be surrounded by blank lines
163-163: null
Lists should be surrounded by blank lines
192-192: null
Emphasis used instead of a heading
196-196: null
Emphasis used instead of a heading
202-202: null
Emphasis used instead of a heading
206-206: null
Emphasis used instead of a heading
211-211: null
Emphasis used instead of a heading
218-218: null
Emphasis used instead of a heading
222-222: null
Emphasis used instead of a heading
226-226: null
Emphasis used instead of a heading
Additional comments not posted (11)
include/logger.h (4)
6-15
: EnumLogLevel
is well-defined and covers a comprehensive range of logging levels.
17-17
: FunctiongetLogLevelFromEnvironment
provides a dynamic way to set logging levels, which enhances configurability.
18-18
: FunctionparseLogLevel
correctly interprets string representations of log levels, which is crucial for user-configurable logging.
19-19
: FunctiontoSpdlogLevel
effectively bridges the customLogLevel
withspdlog
's logging levels, ensuring compatibility.include/Int8Calibrator.h (1)
4-33
: TheInt8EntropyCalibrator2
class is well-defined and adheres to modern C++ standards. Good use of default parameter values and consistent override of virtual functions.src/logger.cpp (1)
1-1
: The logging functionality is implemented correctly and effectively using spdlog. Good handling of different log levels and appropriate warnings for unhandled cases.Also applies to: 3-3, 5-5, 7-7, 9-9, 11-11, 13-13, 15-15, 17-17, 19-19, 21-21, 23-23, 25-25, 27-27, 29-29, 31-31, 33-33, 35-35, 37-37
README.md (3)
137-154
: The updated project structure is well-organized and clearly documented.
157-159
: The additional resources and explanations provided in this section are helpful for understanding the codebase.
Line range hint
165-165
: The debugging tips provided are practical and should help users effectively troubleshoot issues.include/engine/EngineBuildLoadNetwork.inl (2)
6-31
: ThebuildLoadNetwork
function is well-implemented with comprehensive error handling and informative logging.
33-89
: TheloadNetwork
function effectively handles file reading and engine loading with proper error checks.
Summary by CodeRabbit
New Features
Refactor
Documentation