how execute Python code on GPU Graph Jetson TX1

Hello ,
I could interface with CUDA from Python on Jetson TX1 ,
I Know that it’s not possible to install numba and anaconda or mini-anaconda .

Any one have solution how i can accelerate/execute Python code on GPU Graph Jetson TX1 ?

thank you

Hi,

Could you share your use case so that we can give a more precise suggestion?

For general usage, it’s recommended to use pyCUDA.
Here is installation steps for your reference:
https://devtalk.nvidia.com/default/topic/1013387/jetson-tx2/is-the-memory-management-method-of-tx1-and-tx2-different-/post/5167500/#5167500

Thanks.

Thank you ,
i have install pycuda on jetson tx1 .
But ,i have ERROR when i try an example given in Python that computes the product of two arrays :

import pycuda.compiler as comp
import pycuda.driver as drv
import numpy
import pycuda.autoinit

mod = comp.SourceModule("""
__global__ void multiply_them(float *dest, float *a, float *b)
{
  const int i = threadIdx.x;
  dest[i] = a[i] * b[i];
}
""")

multiply_them = mod.get_function("multiply_them")

a = numpy.random.randn(400).astype(numpy.float32)
b = numpy.random.randn(400).astype(numpy.float32)

dest = numpy.zeros_like(a)
multiply_them(
        drv.Out(dest), drv.In(a), drv.In(b),
        block=(400,1,1))

print (dest-a*b)

Errors here

$ python3 add_Matrix.py 
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    """)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/pycuda/compiler.py", line 291, in __init__
    arch, code, cache_dir, include_dirs)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/pycuda/compiler.py", line 255, in compile
    return compile_plain(source, options, keep, nvcc, cache_dir, target)
  File "/home/ubuntu/.local/lib/python3.5/site-packages/pycuda/compiler.py", line 137, in compile_plain
    stderr=stderr.decode("utf-8", "replace"))
pycuda.driver.CompileError: nvcc compilation of /tmp/tmp0w1noknf/kernel.cu failed
[command: nvcc --cubin -arch sm_53 -I/home/ubuntu/.local/lib/python3.5/site-packages/pycuda/cuda kernel.cu]
[stderr:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
]

same error in dmesg :

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.38-tegra (buildbrain@mobile-u64-638) (gcc version 4.8.5 (GCC) ) #1 SMP PREEMPT Thu Mar 1 20:44:58 PST 2018
[    0.000000] Boot CPU: AArch64 Processor [411fd071]
[    0.000000] Found tegra_fbmem: 00800000@92c9d000
[    0.000000] Reserved memory: initialized node iram-carveout, compatible id nvidia,iram-carveout
[    0.000000] Reserved memory: initialized node ramoops_carveout, compatible id nvidia,ramoops
[    0.000000] cma: Reserved 16 MiB at 0x00000000fdc00000
[    0.000000] On node 0 totalpages: 1043456
[    0.000000]   DMA zone: 8192 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 519168 pages, LIFO batch:31
[    0.000000]   Normal zone: 8192 pages used for memmap
[    0.000000]   Normal zone: 524288 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] PERCPU: Embedded 17 pages/cpu @ffffffc0ffe0f000 s31616 r8192 d29824 u69632
[    0.000000] pcpu-alloc: s31616 r8192 d29824 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] CPU features: enabling workaround for ARM erratum 832075
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1027072
[    0.183788] tegra_powergate_init: DONE
[    0.183832] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.4/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dts
[    0.183881] DTB Build time: Mar  1 2018 20:46:06
[    0.186925] tegra_bpmp_of_clk_init: EMC proxy not found.
[    0.186968] Error: Driver 'tegra-mc' is already registered, aborting...
[    0.188468] platform tegra-carveouts: SMMU isn't ready yet
...
[    0.504240] tegra-pcie 1003000.pcie-controller: 4x1, 1x1 configuration
[    0.504312] tegra-pcie 1003000.pcie-controller: failed to get PHY: -517
[    0.504340] tegra-pcie 1003000.pcie-controller: failed to get PHYs: -517
[    0.508384] tsec 54500000.tsec: initialized
...
[    7.233330]   #1: tegra-snd-t210ref-mobile-rt565x
[    7.242923] EXT4-fs (mmcblk1p1): couldn't mount as ext3 due to feature incompatibilities
[    7.253545] EXT4-fs (mmcblk1p1): couldn't mount as ext2 due to feature incompatibilities
[    7.317372] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)
[    7.327438] VFS: Mounted root (ext4 filesystem) on device 179:33.
[    7.338215] devtmpfs: mounted
...
[    7.343410] Freeing unused kernel memory: 1208K (ffffffc001168000 - ffffffc001296000)
[    7.353284] Freeing alternatives memory: 76K (ffffffc001296000 - ffffffc0012a9000)
[    7.378921] btb inv war enabled
[    7.426487] tegra-pcie 1003000.pcie-controller: link 0 down, retrying
[    7.507784] systemd[1]: System time before build time, advancing clock.
...
[    7.696613] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 115 bits of entropy available)
[    7.843828] tegra-pcie 1003000.pcie-controller: link 0 down, retrying
[    7.957198] systemd[1]: Listening on udev Kernel Socket.
...
[71336.247123] gvfsd-dnssd[1751]: unhandled level 2 translation fault (11) at 0x00000000, esr 0x92000006
[71336.261432] pgd = ffffffc0069cd000
[71336.268704] [00000000] *pgd=00000000869c9003, *pud=00000000869c9003, *pmd=0000000000000000

[71336.282007] CPU: 0 PID: 1751 Comm: gvfsd-dnssd Not tainted 4.4.38-tegra #1
...
[71336.406478] Library at 0x7f9af97408: 0x7f9af21000 /lib/aarch64-linux-gnu/libc-2.23.so
[71336.414348] Library at 0x4037a0: 0x400000 /usr/lib/gvfs/gvfsd-dnssd
[71336.420657] vdso base = 0x7f9b46a000
[71858.126508] IPVS: Creating netns size=1424 id=9
...

Hi,

Could you try to reinstalling build-essential?

https://stackoverflow.com/questions/11912878/gcc-error-gcc-error-trying-to-exec-cc1-execvp-no-such-file-or-directory

sudo apt-get update
sudo apt-get install --reinstall build-essential

Thanks.

Hi ,

Thank you AastaLLL ,
yes , i have .

ubuntu@tegra-ubuntu:~$ which gcc
/usr/bin/gcc

the same problem

Hi,

Could you also try this on g++.

sudo apt-get install g++

Thanks.

No !!!

anyway ,

Thank you :)

Hi,

Sorry for the late reply.
Have this issue fixed in your side?

Thanks.