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
cuda error in TensorRT5 when using DALI preprocessing #408
Comments
Hi, |
Tracked as DALI-472. |
My environment is: [sample_bug.py] This sample uses a UFF MNIST model to create a TensorRT Inference Engineimport numpy as np parser = argparse.ArgumentParser() You can set the logger severity higher to suppress messages (or lower to display more messages).TRT_LOGGER = trt.Logger(trt.Logger.INFO) import nvidia.dali.ops as ops batch_size = 1 class SimplePipeline(Pipeline):
class ModelData(object): def build_engine(model_file): def main():
if name == 'main': [common.py] try: def GiB(val): def find_sample_data(description="Runs a TensorRT Python sample", subfolder="", find_files=[]):
Simple helper data class that's a little nicer to use than a 2-tuple.class HostDeviceMem(object):
Allocates all buffers required for an engine, i.e. host/device inputs/outputs.def allocate_buffers(engine): This function is generalized for multiple inputs/outputs.inputs and outputs are expected to be lists of HostDeviceMem objects.def do_inference(context, bindings, inputs, outputs, stream, batch_size=1): |
Hi, |
Hi |
Hi, |
Any further information, pls let me know, thanks. |
@herbiezhao I think that repro you provided is sufficient for us. We got the same error so it is up to us in Nvidia to debug it. |
I got the same error, when I used TF-GPU + TRT. |
Even without DALI? |
Hi @herbiezhao - I am looking at the problem from the TRT side. Thank you for all your help so far. If you have a reproduction script that does not use DALI (but uses TF-GPU) it would be very helpful to narrow down the cause. |
from random import randint You can set the logger severity higher to suppress messages (or lower to display more messages).TRT_LOGGER = trt.Logger(trt.Logger.WARNING) class ModelData(object): def build_engine(model_file):
if name == 'main': |
@fkaster-nvidia |
Hi,
|
More permanent solution as WIP - #882 |
DALI workaround for pycuda context management merged in #882, will be available in the next nightly build or in >= 0.11.0 |
Please retest with 0.11 and reopen if it still doesn't work. |
I use DALI to preprocess my data, then input pipe_out of DALI to tensorRT inference.I got cuda error:
Cuda error in file src/implicit_gemm.cu at line 1214: invalid resource handle
[TensorRT] ERROR: cuda/customWinogradConvActLayer.cpp (310) - Cuda Error in execute: 33
[TensorRT] ERROR: cuda/customWinogradConvActLayer.cpp (310) - Cuda Error in execute: 33
Partial code:
pipe_out = pipe.run()
pre_input, labels = pipe_out
pre_input_cpu = pre_input.asCPU()
pre_input_tensor = pre_input_cpu.as_tensor()
pre_input_ = np.array(pre_input_tensor)
input_ = np.array(pre_input_.ravel())
np.copyto(pagelocked_buffer, input_)
[output] = common.do_inference(context, bindings=bindings, inputs=inputs, outputs=outputs, stream=stream)
Error happens in code "[output] = common.do_inference(context, bindings=bindings, inputs=inputs, outputs=outputs, stream=stream)"
I got correct output in DALI and I got correct output in TensorRT5 without DALI.
The text was updated successfully, but these errors were encountered: