Skip to content
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

How to use deconvolution layer correctly? #1151

Closed
freedenS opened this issue Mar 25, 2021 · 2 comments
Closed

How to use deconvolution layer correctly? #1151

freedenS opened this issue Mar 25, 2021 · 2 comments

Comments

@freedenS
Copy link

Description

I tried to use deconvolution with the following code, but there's something wrong like this.
How should i correctly use the deconvolution layer?

[03/25/2021-16:25:01] [F] [TRT] Assertion failed: cublasStatus == CUBLAS_STATUS_SUCCESS
C:\source\rtSafe\cublas\cublasLtWrapper.cpp:279
Aborting...
[03/25/2021-16:25:01] [E] [TRT] C:\source\rtSafe\cublas\cublasLtWrapper.cpp (279) - Assertion Error in nvinfer1::CublasLtWrapper::getCublasLtHeuristic: 0 (cublasStatus == CUBLAS_STATUS_SUCCESS)

Environment

TensorRT Version: 7.2.1.6
NVIDIA GPU: 2080Ti
NVIDIA Driver Version: 441.87
CUDA Version: 10.2
CUDNN Version: 8.0.4
Operating System: win10
Python Version (if applicable):
Tensorflow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if so, version):

Relevant Files

Steps To Reproduce

IBuilder* builder = createInferBuilder(gLogger);
IBuilderConfig* config = builder->createBuilderConfig();
INetworkDefinition* network = builder->createNetworkV2(0U);

ITensor* input = network->addInput("input", DataType::kFLOAT, Dims4{ 10,256,14,14 });
Weights emptywts{ DataType::kFLOAT, nullptr, 0 };
std::vector<float> deval(262144,1.0);
Weights deconvwtsl{ DataType::kFLOAT, deval.data(), 262144 };
auto deconv = network->addDeconvolutionNd(*input, 256, DimsHW{ 2,2 }, deconvwtsl, emptywts);
deconv->setStrideNd(DimsHW{ 2,2 });
network->markOutput(*deconv->getOutput(0));
builder->setMaxBatchSize(maxBatchSize);
config->setMaxWorkspaceSize(16 * (1 << 20));
ICudaEngine* engine = builder->buildEngineWithConfig(*network, *config);
network->destroy();
IHostMemory* modelStream = engine->serialize();
std::ofstream p ("test.engine", std::ios::binary);
p.write(reinterpret_cast<const char*>(modelStream->data()), modelStream->size());
modelStream->destroy();
@pranavm-nvidia
Copy link
Collaborator

@freedenS There's a known cuBLAS LT bug in CUDA 10.2. You can fix it either by upgrading to a newer patch version of 10.2, or using the work-around mentioned here. Since you're using the API you can use config->setTacticSources() to disable cuBLAS LT.

@freedenS
Copy link
Author

Thank you very much for the comprehensive solutions!
I have updated cuda and it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants