Hi,
Win10
RTX 2080
nvidia driver version: 417.35
CUDA version: 10
CUDNN version: 7.3.1 or 7.4.2
Python version [3.6]
pytorch 1.0
I tried to import ONNX model into tensorRT using sample project “sampleONNXMNIST” coming with TensorRT-5.0.4.3 SDK. The ONNX model was trained and saved in Pytorch 1.0. It succeeded to pass nvonnxparser function, however it failed on buildCudaEngine function. Error message is :
ERROR: c:\p4sw\sw\gpgpu\MachineLearning\DIT\release\5.0\builder\cudnnBuilderUtils.cpp (255) - Cuda Error in nvinfer1::cudnn::findFastestTactic: 4
ERROR: c:\p4sw\sw\gpgpu\MachineLearning\DIT\release\5.0\engine\runtime.cpp (30) - Cuda Error in nvinfer1::`anonymous-namespace’::DefaultAllocator::free: 4
the code is like this :
IBuilder* builder = createInferBuilder(gLogger); nvinfer1::INetworkDefinition* network = builder->createNetwork(); auto parser = nvonnxparser::createParser(*network, gLogger); if (!parser->parseFromFile(modelFile.c_str(), verbosity)) { std::string msg("failed to parse onnx file"); gLogger.log(nvinfer1::ILogger::Severity::kERROR, msg.c_str()); exit(EXIT_FAILURE); } // Build the engine builder->setMaxBatchSize(maxBatchSize); std::size_t x = builder->getMaxWorkspaceSize(); builder->setMaxWorkspaceSize(3600_MB); printf("%ld\n", x); samplesCommon::enableDLA(builder, gUseDLACore); ICudaEngine* engine = builder->buildCudaEngine(*network); assert(engine); I also tried a few parameters for setMaxWorkspaceSize, still no luck but error message could be different. I attached the model file i used, Thanks.