Fast Cuda python code or TensorRT python code

I would like to know what is fast method to run python code like tensorflow, pytoruch, keras etc. in Jetson nano?

I see python code can convert to cuda using like pycuda.
Also I see python code can convert to tensorrt.

What is fast running method of python code in Jetson nano?

Is it have any other method to run fast python codes in Jetson nano?

Hi @wmindramalw, the TensorFlow and PyTorch wheels and containers that we provide for Jetson are build with GPU support enabled, so you can use GPU acceleration with them the same way as you would on a PC (e.g. with PyTorch, by calling tensor.cuda() and model.cuda(), ect). You can download these from the Jetson Zoo.

The fastest way to deploy DNNs for inference will be with TensorRT. TensorRT has Python and C++ APIs, and you can export your models from TensorFlow/PyTorch/ect to formats (such as ONNX) that can be loaded by TensorRT.

There is also direct integration of TensorRT with TensorFlow (TF-TRT) and PyTorch (torch2trt) that don’t require explicit use of the TensorRT API, but rather run the models underneath in TensorRT. These interoperability libraries make it easier to run your models in TensorRT.

pycuda is an interface for running CUDA kernels from Python, however it doesn’t automatically convert or vectorize Python code to CUDA. For vectorization, there are other Python libraries like numba. For conversion of numpy codes to use GPU, there is cupy library.