Почему я всегда получаю ошибку, когда хочу использовать функцию fftshift Tensorflow на своем оборудовании Jetson TX2/NANO

#python #tensorflow #fft

Вопрос:

Когда я выполняю функцию tf.signal.fftshift, появляется следующее сообщение об ошибке.

 root@nvidia:/media/nvidia/Projekt# python Test.py 
2021-03-30 23:54:31.633937: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2021-03-30 23:54:35.405650: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer.so.6
2021-03-30 23:54:35.408225: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libnvinfer_plugin.so.6
2021-03-30 23:54:39.926703: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2021-03-30 23:54:39.973741: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:39.974239: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: 
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X2 computeCapability: 6.2
coreClock: 1.3GHz coreCount: 2 deviceMemorySize: 7.68GiB deviceMemoryBandwidth: 38.74GiB/s
2021-03-30 23:54:39.974367: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2021-03-30 23:54:39.974535: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2021-03-30 23:54:39.979612: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2021-03-30 23:54:39.981287: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2021-03-30 23:54:39.990400: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2021-03-30 23:54:39.995649: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2021-03-30 23:54:39.995933: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-03-30 23:54:39.996429: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:39.997767: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:39.998149: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2021-03-30 23:54:40.035444: W tensorflow/core/platform/profile_utils/cpu_utils.cc:98] Failed to find bogomips in /proc/cpuinfo; cannot determine CPU frequency
2021-03-30 23:54:40.037824: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55643829c0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-03-30 23:54:40.037973: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2021-03-30 23:54:40.175133: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:40.178356: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55642e8310 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2021-03-30 23:54:40.178765: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): NVIDIA Tegra X2, Compute Capability 6.2
2021-03-30 23:54:40.181057: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:40.181713: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: 
pciBusID: 0000:00:00.0 name: NVIDIA Tegra X2 computeCapability: 6.2
coreClock: 1.3GHz coreCount: 2 deviceMemorySize: 7.68GiB deviceMemoryBandwidth: 38.74GiB/s
2021-03-30 23:54:40.181866: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2021-03-30 23:54:40.181978: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2021-03-30 23:54:40.182115: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10.0
2021-03-30 23:54:40.182244: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10.0
2021-03-30 23:54:40.182368: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10.0
2021-03-30 23:54:40.182491: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10.0
2021-03-30 23:54:40.182595: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-03-30 23:54:40.183403: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:40.184077: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:40.184441: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0
2021-03-30 23:54:40.184750: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.0
2021-03-30 23:54:44.271377: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-30 23:54:44.271532: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102]      0 
2021-03-30 23:54:44.271600: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0:   N 
2021-03-30 23:54:44.272512: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:44.273298: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:948] ARM64 does not support NUMA - returning NUMA node zero
2021-03-30 23:54:44.273804: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3250 MB memory) -> physical GPU (device: 0, name: NVIDIA Tegra X2, pci bus id: 0000:00:00.0, compute capability: 6.2)
2021-03-30 23:54:45.000556: F tensorflow/core/kernels/roll_op_gpu.cu.cc:84] Non-OK-status: GpuLaunchKernel(RollKernel<T>, cfg.block_count, cfg.thread_per_block, 0, d.stream(), cfg.virtual_thread_count, num_dims, input, output, reinterpret_cast<const int32*>(dim_buf), reinterpret_cast<const int32*>(thres_buf), reinterpret_cast<const int64*>(range_buf)) status: Internal: too many resources requested for launch
Aborted (core dumped)

 

Я попробовал следующее созвездие.

  • Jetson TX2 — Реактивный ранец 4.3 — Tensorflow 2.1 — Python 3.6.9
  • Jetson NANO 4 ГБ — JetPack 4.5.1 — Tensorflow 2.4 — Python 3.6.9

Я нашел изображения устройств на следующей странице. Ссылка

Я установил Tensorflow в соответствии с инструкциями на странице Nvidia. Ссылка

В обоих случаях ошибка возникает при выполнении следующего кода.

 import tensorflow as tf

x = tf.signal.fftshift([ 0.,  1.,  2.,  3.,  4., -5., -4., -3., -2., -1.])
x.numpy()      # array([-5., -4., -3., -2., -1.,  0.,  1.,  2.,  3.,  4.])