Use autocxx bindings for NetworkDefinition, CudaEngine, EngineInspector#16
Use autocxx bindings for NetworkDefinition, CudaEngine, EngineInspector#16theHamsta wants to merge 39 commits intorustnn:mainfrom
Conversation
trtx/src/error.rs
Outdated
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
| #[repr(i32)] | ||
| pub enum LayerTypeKind { | ||
| Convolution = 0, |
There was a problem hiding this comment.
Can we extract those constants automatically through autocxx?
There was a problem hiding this comment.
No, the project kind of stalled. They do not expose the capability to automatically derive Debug, also autocxx does not support the parse hooks in their fork of bindgen.
The most straight forward way would be to add a proc_macro to add Debug to the autocxx types (It would go through the token tree generated by autocxx and add derivce(Debug) where autocxx already has derivce(Eq,PartialEq, Copy, Clone) for generate_pod.
Or fork autocxx. I would try to make this work for all enums. I put this manual enum here as a placeholder
There was a problem hiding this comment.
I understand. Crubit seems to be the new Vehicle by the devs and it not designed to be used outside of the google monoproject ecosystem yet.
a07bffd to
2c9add7
Compare
trtx/src/error.rs
Outdated
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
| #[repr(i32)] | ||
| pub enum LayerTypeKind { | ||
| Convolution = 0, |
There was a problem hiding this comment.
I understand. Crubit seems to be the new Vehicle by the devs and it not designed to be used outside of the google monoproject ecosystem yet.
420b143 to
2f3a9cc
Compare
2f3a9cc to
3240324
Compare
Everything is real now
It's not additive to mock and can't really be relied on. Real should just be the absence of mock.
|
Superseeded by #28 |
As with #15 , try to use more generated bindings from autocxx. I would recommend to merged #15 first, since same approach but smaller.
Specifically, expose all methods of CudaEngine, and add EngineInspector.
IRuntime, IBuilder are still with the old logic, and should be tackled next.