-
Notifications
You must be signed in to change notification settings - Fork 747
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
IInt8EntropyCalibrator2 is difficult to use #902
Comments
That would happen if it were "virtualized", but it's currently not tagged that way. While we're at it, could you give me a list of classes that are meant to be subclassed by users this way? Thanks! |
Good question, there seems to be quite many of those. Reading the .h file, I think below is quite complete set of classes that application is likely to subclass. IInt8Calibrator related classes: In case someone wants to implement pure java custom layer: and some classes I have not yet used, but seems relevant: |
Ok, I've added those to the last commit. Please try it with the snapshots after the builds are done in a day or two:
Everything from that list, expect maybe
It looks like the only other classes that should be implemented are things related to plugins like |
Oops, the overriding warning was not in the h files. Non-deprecated classes for custom plugin are then only IPluginV2Ext, IPluginV2IOExt and IPluginCreator. |
Changes released with version 1.5.4. Thanks for reporting and please let me know if you need anything else fixed! |
Tensorrt offers class IInt8EntropyCalibrator2 for providing scale calibration data (batches) for model conversion to 8-bit.
This class has 4 pure virtual methods getBatchSize, getBatch, readCalibrationCache and writeCalibrationCache; Purpose of class is to allow custom implementation of these methods.
In order to be useful, class org.bytedeco.tensorrt.nvinfer.IInt8EntropyCalibrator2 should be possible to extend and implement above methods in Java.
To me it seems doing this is quite difficult. The constructor public IInt8EntropyCalibrator2(Pointer p) expects native object, so extending still requires use of javacpp (not just pure java).
Would it be possible to have org.bytedeco.tensorrt.nvinfer.IInt8EntropyCalibrator2 in such way that it has contructor public IInt8EntropyCalibrator2() and abstract java methods getBatchSize and getBatch; and native code would route any c++ calls to these methods into Java?
The text was updated successfully, but these errors were encountered: