Hi @LiX
Based on your question, it looks like you might have better luck with a different forum branch (originally the question has been posted in CUDA-GDB forum branch, which is dedicated to CUDA-GDB tool support):
Thanks for your comment. TensorFlow was installed successfully on my Xavier NX, which can be proven by the fact that $ import tensorflow as tf \n tf.test.is_gpu_available() and it return True. After creating an additional 8G swapfile on my machine above mentioned errors were fixed, but the other error occurred: Allocator (GPU_0_bfc) ran out of memory trying to allocate 1.33GiB (rounded to xx). Additionally, “If the cause is memory fragmentation maybe the environment variable ‘TF_GPU_ALLOCATOR=cuda_malloc_async’ will improve the situation” also occurred on console(terminal). Thus, I want to konw how to set the environment variable ‘TF_GPU_ALLOCATOR=cuda_malloc_async’? Is $ sudo gedit ~/.barchrc \n adding “TF_GPU_ALLOCATOR=cuda_malloc_async” on the end of the file?
It’s essential to check if the installed package is built with the same JetPack version.
The GPU driver is updated across different versions so it may cause some unexpected issues.
More, please note that swap memory cannot be accessed by GPU.
Since Jetson’s CPU and GPU use the same physical memory, it might lead to errors if the implementation doesn’t manage the integrated memory case.
I’m very happy for your replay and have benefited a lot from your comments!
I used torch and tensorflow to implement deep learning algorithms for classfication and sementic segmentation on Xavier NX a few weeks ago. Despite the above errors, the code can still run normally, but the algorithm’s time-consuming is very long in classifying and segmenting the first image. During the segmentation, the code seems to have been trying to obtain enough memory from Xavier until enough. However, time-consuming is normal starting from the second image both for classfication and segmentation. I really want to know the principle behind this.
For Jetson, it’s more recommended to deploy a model with TensorRT.
Since it is our own library, we have optimized the memory usage and performance for the Jetson platform.
You can find a tutorial below:
(It’s expected to convert the PyTorch or TensorFlow into the ONNX format first)