Closed Skier23 closed 9 hours ago
If this is something that would be considered, I'd be happy to assist with testing but my knowledge of the layers within the backbone architecture here is a bit limited thus the request instead of trying to tackle this myself. I created a model based on the MaxVIT_XL_512 model here (highest f1 of all the models in this repo for my use-case) and I currently have hundreds of users using the model actively which is the reason for the request as getting tensorrt support could 2x or even more the throughput of the model for all my users.
@Skier23 there are no 'custom' operators, no custom kernels, trition, cuda, etc used in this model, not even any Autograd fns. So you might want to dig in to what pytorch ops are not supported because it's all pytorch ops. The logs provided do not point to anything specific. Will close unless there's nore actionanable info.
Is your feature request related to a problem? Please describe. Currently the maxvit models in this repo cannot be compiled with tensorrt which would enable massive potential speedups. According to NVidia in this thread, the reason that the model cannot be compiled or converted to tensorrt is because the implementation of MaxVIT in this repo uses custom operators for which there is no registered tensorrt importer. See details: https://github.com/NVIDIA/TensorRT/issues/3734:
Follow-up request from https://github.com/huggingface/pytorch-image-models/issues/2129
Describe the solution you'd like If the few custom layers could be replaced with more standard pytorch layers for which there may already be tensorrt converters/importers then hopefully a few layer changes on the timm side could enable the timm MaxVIT models to be supported with tensorrt
Describe alternatives you've considered I've tried every way possible to try to get the MaxVIT model in this repo onto TensorRT but all approaches have failed likely all because of these custom operators: https://forums.developer.nvidia.com/t/struggling-to-get-model-onto-tensorrt/287310
Additional context Add any other context or screenshots about the feature request here.