Object Detection API inference on Tegra GPU
I have installed Tensorflow on the Nvidia Jetson TX2, and I am trying to run the object detection inference tutorial on it.
I have added swap space, so the total memory available is 16Gb. I read that the GPU and CPU share memory on the Jetson TX2. When running the tutorial all of my ram is used up, but the swap space isn't touched. However, I receive the following error stating that the there are are too many resources requested to launch. However, I am not running out of memory.
I read a similar issue here ( https://github.com/tensorflow/serving/issues/627). While the same error is observed, I am not sure it is relevant to this situation.
2018-01-06 19:17:57.586328: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:857] ARM64 does not support NUMA - returning NUMA node zero
2018-01-06 19:17:57.586447: I tensorflow/core/common_runtime/gpu/gpu_device.cc:955] Found device 0 with properties:
name: NVIDIA Tegra X2
major: 6 minor: 2 memoryClockRate (GHz) 1.3005
pciBusID 0000:00:00.0
Total memory: 7.67GiB
Free memory: 4.15GiB
2018-01-06 19:17:57.586494: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0
2018-01-06 19:17:57.586517: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0: Y
2018-01-06 19:17:57.586543: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: NVIDIA Tegra X2, pci bus id: 0000:00:00.0)
> /home/nvidia/object_detection_inference.py(77)<module>()
-> scores = sess.run([detection_scores],feed_dict={image_tensor: image_np_expanded})
(Pdb) n
2018-01-06 19:18:39.591828: W tensorflow/core/common_runtime/bfc_allocator.cc:217] Allocator (GPU_0_bfc) ran out of memory trying to allocate 3.83GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
2018-01-06 19:18:43.355772: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
2018-01-06 19:18:43.357016: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.357145: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.357280: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.360367: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
2018-01-06 19:18:43.361503: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.361551: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.361575: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.361521: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362400: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362416: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362513: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362520: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362572: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362607: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362666: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362667: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362752: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362792: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362683: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362853: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362974: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.362991: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.363476: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.363499: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.363593: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.364079: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.364342: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.364436: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.364517: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.364874: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.364971: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.365039: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.365304: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.365384: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.366533: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.367183: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
2018-01-06 19:18:43.367239: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.367358: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.367361: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.367614: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.367927: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.368029: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.368488: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
2018-01-06 19:18:43.368615: W tensorflow/core/framework/op_kernel.cc:1192] Internal: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
tensorflow.python.framework.errors_impl.InternalError: WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_9/Gather/Gather_2/_141 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_3737_SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_9/Gather/Gather_2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](^_cloopSecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField/Assert/Assert/data_0/_6)]]
Caused by op 'SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where', defined at:
File "object_detection_inference.py", line 32, in <module>
tf.import_graph_def(od_graph_def, name='')
File "/home/nvidia/.local/lib/python3.5/site-packages/tensorflow/python/framework/importer.py", line 313, in import_graph_def
op_def=op_def)
File "/home/nvidia/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2630, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/nvidia/.local/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1204, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InternalError (see above for traceback): WhereOp: Could not launch cub::DeviceReduce::Sum to count number of true indices. temp_storage_bytes: 1, status: too many resources requested for launch
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Where = Where[_device="/job:localhost/replica:0/task:0/gpu:0"](SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_11/Greater)]]
[[Node: SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_9/Gather/Gather_2/_141 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_3737_SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ClipToWindow_9/Gather/Gather_2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"](^_cloopSecondStagePostprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField/Assert/Assert/data_0/_6)]]
Is there a way to disable NMS from the config? I tried telling TF to allocate memory on demand, and it still didn't fix the issue.
hey @oneTimePad i am doing the same as you. I am running realtime object detection via webcam and opencv on the jetson tx2. Everything runs perfectly fine but the performance still needs to be improved. Somehow it runs only at 6%Gpu Usage and 5fps.... but have a look at my project Repo (https://github.com/GustavZ/realtime_object_detection).
Would be great if you add ideas / contribute!
@GustavZ Thank you! I completely forgot about mobilenet; I was using Inception-resnet-v2 (that might of been my issue). I was also running Faster R-CNN, since for my project I'm just running it through images at a low frame rate (<1fps) and really need high accuracy. However, using Faster R-CNN might also be my issue.
I had asked a similar question on the Nvidia help forum, and they led me to one of the issues you commented on, regarding NMS being ran on the CPU causing the model to be slow on the TX2.
I actually was able to remove NMS from the api in my fork. I didn't notice any extra bounding boxes when I ran inference. It might be because my dataset is pretty simple. However, it still got the error above. I will try it with mobilenet and then without NMS to see if I get a performance boost. Here is my repo (no_nms branch) without NMS. [https://github.com/RUAIAA/models/tree/no_nms].
And yes, I'll contribute if I have any new ideas!
@oneTimePad how/where did you remove the NMS? Did your Memory Usage or Fps increase? Could you give a short guide on how to do it? Is it necessary to retrain the network after that or is it possible to do this with a pretrained model from the "model zoo" afterwards?
@GustavZ In multiclass_non_max_suppression in postprocessing.py I removed the lines 144-148 and added code (see the github repo and branch posted above) that just allows all bounding boxes through. I retrained the net from the checkpoint (the "model zoo") and it seemed to be training fine, not much change in loss. I haven't done any tests on just evaluating a "model zoo" checkpoint without fine-tuning it. But it definitely works with fine-tuning a "model zoo" checkpoint.
I was a unable to check the changes in Memory Usage or Fps since I still got the errors above, but regarding other parts of the code. I was using Faster R-CNN with Inception V2. It turns out that was the reason I couldn't run it. I switched over to SSD with mobilenets and didn't experience the error above; In addition, I didn't need to remove NMS.
My tests with SSD and mobilenets are on single images haven't tried video yet or haven't done much with inference yet. I'm still trying to get it to train on my dataset...can't the loss low enough. I would like to use a model like InceptionV2; however, the loss with SSD and InceptionV2 was terrible. With a model like that though NMS might need to be removed. I might try adding InceptionV3.
Have you put your Jetson in high performance mode?
This I believe passes all Bounding boxes through and doesn't prune any via NMS:
selected_indices = tf.transpose(
tf.range(
boxlist_filtered.num_boxes()))
@oneTimePad did you manage to run Faster R-CNN on the Jetson? I'm stuck with the same problem as you. SSD runs out of the box, but Faster R-CNN fails.
@JesperChristensen89 I was unable to get Faster R-CNN running on the Jetson. It seems to be more than just NMS that is causing the Jetson to run out of memory. You might already know this, but there does exist a Faster R-CNN implementation in NVCaffe for the Jetson. I am not sure if you can fine-tune it. For now I am using SSD withe MobileNet
@GustavZ so I ran SSD, and I don't get anywhere near 4fps. I put the jetson in mode 0 and ran jetson_clocks.sh. What else did you do to make it faster? What changes did you make in your repo that made it faster? I am not using the visualization either.
@oneTimePad Check this issue, The code posted by wkelongws works and gives around 10fps with ssd-mobilenet. He has achieved it by splitting the load- by having the CNN stuff on GPU and the Post processing stuff on CPU. BTW were you able to get Faster R-CNN working on TX2 yet? I am getting the same error as yours.
@rohitsalem Thanks! I'll take a look.
Interestingly, I found the issue why SSD was so slow for me. It was a bug in my custom inference code. I am taking my target image and extracting 24 crops of size 1000x1000 (original image was 24MP) and running them though SSD in parallel. This is to deal with the small object issue, and it seems to be able to run through all 24 crops in around 1.3 seconds. I'll need to do more tests to make sure this number is correct. However, I did not modify SSD at all.
In regards to Faster R-CNN, unfortunately I was unable to get that to run on the TX2.
I too haven't been able to run Faster R-CNN on the TX2. This is something I would very much like to succeed with! If anyone of you have the Jetson up and running readily available, could you try running Faster R-CNN on the CPU instead of the GPU? I think this would give us the final answer to whether or not the model is simply too large for the memory on the TX2.
@oneTimePad Hi, were you able to run the tensorflow faster RCNN with Inception V2 model on Jetson TX2 platform? I am trying to run it on Jetson TX2 but unable to do so because of the same error due to NMS.
Similar here, getting the too many resources requested for launch error. My tensorflow r1.8 on TX2 was built from source.
I've found a similar issue in mxnet(apache/incubator-mxnet/issues/6204).
According to that issue and some related posts, it seems that __launch_bounds and nvcc option maxrregcount might help. I would like to try to rebuild tensorflow with that maxrregcount but got nowhere to figure out how to config the bazel stuff. And I've no clue about the exact value I should pick for maxrregcount on Jetson TX2.
Could anyone help? Any tip is welcomed!
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.