vkdt on jetson nano ?

Hi,
What are the constraints for compiling vkdt on an ARM machine?
Currently the jetson nano is limited to ubuntu version 18 even if there are some 20 versions on the web
Before to start compiling, I would like to know what are the minimum requirements?
jetson nano specs

Hm. It was possible to compile it on ubuntu 20.04 if you installed a special vulkan package. But i think it’s not possible to compile it on debian 10.

Hello,
do you know the minimum vulkan version requested?
jetson nano by default used ubuntu 18 max. Without nvidia warranty we can install ubuntu 20. The other point concerns the possible restrictions related to the ARM architecture?

i don’t think there are essential intel instructions used cpu side. there may be some more or less unused bits of sse intrinsics here or there, but it should be very easy to delete/replace these parts if necessary. the easiest way to do it is probably just compile on arm and see what happens.

i think vulkan sdk 1.2.162.0 is the minimum required version. it’s quite old by now but i’m not sure it comes with ubuntu by default in any version. certainly not 18.x, but it may be possible to just install the lunarg sdk manually instead.

other than that vkdt does not have a lot of library dependencies, and those will be mostly optional.

(your jetson link is broken now or maybe it is just for logged in developers)

maxwell doesn’t sound great but should be enough to at least run vkdt.

Thanks a lot. Here are the main specifications of the jetson nano.
Maxwell GPU
128-core GPU | End-to-end lossless compression | Tile Caching |
OpenGL® 4.6 | OpenGL ES 3.2 | Vulkan™ 1.1 | CUDA® | OpenGL
ES Shader Performance (up to): 512 GFLOPS (FP16)
Maximum Operating Frequency: 921MHz
CPU
ARM ® Cortex® -A57 MPCore (Quad-Core) Processor with NEON
Technology | L1 Cache: 48KB L1 instruction cache (I-cache) per
core; 32KB L1 data cache (D-cache) per core | L2 Unified Cache:
2MB | Maximum Operating Frequency: 1.43GHz

I need to find out if there have been updates to Vulkan 1.2

right. vk 1.1 features may be enough if the software is 1.2. most vk functionality (ray tracing etc) is optional, but i’m depending on 1.2.something interfaces to ask the api whether stuff is present or not.

at any rate the features should be optional… so if something doesn’t work it may be possible that i update the code to make it run on older hardware too. off the top of my head there may be something about ycrcb webcam colour encoding and the optional ray tracing feature.

I will start some tests and I will keep you informed of my progress or any blockages encountered

1 Like

Hello, after some setbacks with the dependencies setup, now I’m stuck on one issue

clang: error: the clang compiler does not support ‘-march=native’
internet should help me

if you haven’t already, create your own config.mk in bin to override the settings in the default version. then just drop the option… it’s for optimisation only.

Yes it works
new/old issues :slight_smile:

  • unable to access to ‘pipe/modules//.tesc’ and ‘pipe/modules//.tese’
  • ./pipe/raytrace.h:10:3: error: unknown type name ‘VkAccelerationStructureKHR’
jetson@nano:~/vkdt/bin$ make debug
make -C .. debug
make[1] : on entre dans le répertoire « /home/jetson/vkdt »
Makefile:52: [ext (Makefile)]
mkdir -p built/
Makefile:13: [ext (Makefile)]
bin/config.mk.defaults:48: [ext (Makefile)]
bin/config.mk.defaults:49: [ext (Makefile)]
Makefile:52: [ext (Makefile)]
make -C ext/
make[2] : on entre dans le répertoire « /home/jetson/vkdt/ext »
make[2]: rien à faire pour « all ».
make[2] : on quitte le répertoire « /home/jetson/vkdt/ext »
Makefile:56: [src (ext Makefile)]
mkdir -p built/
Makefile:13: [src (ext Makefile)]
bin/config.mk.defaults:48: [src (ext Makefile)]
bin/config.mk.defaults:49: [src (ext Makefile)]
Makefile:56: [src (ext Makefile)]
make -C src/
make[2] : on entre dans le répertoire « /home/jetson/vkdt/src »
ls: impossible d'accéder à 'pipe/modules/*/*.tesc': Aucun fichier ou dossier de ce type
ls: impossible d'accéder à 'pipe/modules/*/*.tese': Aucun fichier ou dossier de ce type
clang -Wall -pipe -I. -D_GNU_SOURCE -std=c11 -DVK_ENABLE_BETA_EXTENSIONS -fPIE -g -gdwarf-2 -ggdb3 -O0 -DQVK_ENABLE_VALIDATION -DDEBUG_MARKERS   -c cli/main.c -o cli/main.o
In file included from cli/main.c:2:
In file included from ./pipe/graph.h:2:
In file included from ./pipe/node.h:4:
./pipe/raytrace.h:10:3: error: unknown type name 'VkAccelerationStructureKHR'
  VkAccelerationStructureKHR                  accel;          // for ray tracing: top level for all nodes that may hold bottom level
  ^
./pipe/raytrace.h:17:2: error: unknown type name 'VkAccelerationStructureGeometryKHR'
        VkAccelerationStructureGeometryKHR          geometry;
        ^
./pipe/raytrace.h:18:3: error: unknown type name 'VkAccelerationStructureBuildGeometryInfoKHR'
  VkAccelerationStructureBuildGeometryInfoKHR build_info;
  ^
./pipe/raytrace.h:38:3: error: unknown type name 'VkAccelerationStructureKHR'
  VkAccelerationStructureKHR                  accel;          // needed for ray tracing kernels: bottom level structure
  ^
./pipe/raytrace.h:39:2: error: unknown type name 'VkAccelerationStructureGeometryKHR'
        VkAccelerationStructureGeometryKHR          geometry;
        ^
./pipe/raytrace.h:40:3: error: unknown type name 'VkAccelerationStructureBuildGeometryInfoKHR'
  VkAccelerationStructureBuildGeometryInfoKHR build_info;     // geometry info
  ^
6 errors generated.
Makefile:83: recipe for target 'cli/main.o' failed
make[2]: *** [cli/main.o] Error 1
make[2] : on quitte le répertoire « /home/jetson/vkdt/src »
Makefile:56: recipe for target 'src' failed
make[1]: *** [src] Error 2
make[1] : on quitte le répertoire « /home/jetson/vkdt »
Makefile:10: recipe for target 'debug' failed
make: *** [debug] Error 2

this means your vk is too old. at this point that concerns the headers. not sure whether/how you installed the sdk, but the compiler will need to get the right -I switch there. i’m not at a computer these days so can only be of limited help…

The compiler on these old OS did not support native arch optimization for this ARM processor, just remove the flag.

Edit: sorry I didn’t see it was already done :slight_smile:

next issue : vulkan sdk!
:slight_smile:

i’m back at teh computers. had any luck with this? i can probably introduce vulkan cflags/ldflags in the config.mk file if it’s any help customising the location of the headers/library. or did you find any other roadblocks? i vaguely remember that there is always some fiddling required with the config files for the validation layers and similar (something implicit_layer.d/).

Since you are back, who makes the OSB packages? I noticed there is not one for fedora 36.

i suppose that would be me, too. iirc that was the one with some weird fedora specific rpath quality control issue that i fail to understand?

maybe to add to this: the log file isn’t very specific which issue has the rpath, supposedly.

on the other hand i can check locally with objdump or readelf and i don’t see any rpath related entry in my binaries at all. so maybe the script to create the rpm adds these in the first place? i suppose really we’ll just want to ignore this thing anyways… maybe @darix can advise as a distro wizard here? on rawhide there seems to be an even more severe issue with the setup.

redhat does something funky in the %build section:

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.8othk4
+ umask 022
+ cd /home/abuild/rpmbuild/BUILD
+ CFLAGS='-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-cla
+ export CFLAGS
+ CXXFLAGS='-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-c
+ export CXXFLAGS
+ FFLAGS='-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-cla
+ export FFLAGS
+ FCFLAGS='-O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-cl
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -Wl,-dT,/home/abuild/rpmbuild/BUILD/vkdt-0~git1658246500.f95f50c/.package_note-vkdt-0~git1658246500.f95f50c-77.1.x86_64.ld'
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ '[' -f /usr/lib/rpm/generate-rpm-note.sh ']'
+ /usr/lib/rpm/generate-rpm-note.sh vkdt 0~git1658246500.f95f50c-77.1 x86_64
+ cd vkdt-0~git1658246500.f95f50c

All this code runs before even the code from the rpm spec file started.

+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH

is probably causing the rpath. maybe @asn can bring this up at Fedora.

1 Like

Hello, thank you for the new release
I’ve just tested it (arm compatible) on jetson nano
I got this error

Any hints?

make[5]: Entering directory '/home/jetson/vkdt/built/ext/rawspeed'
[  2%] Building CXX object CMakeFiles/rawspeed.dir/src/librawspeed/common/DngOpcodes.cpp.o
In file included from /home/jetson/vkdt/ext/rawspeed/src/librawspeed/common/DngOpcodes.cpp:25:
/home/jetson/vkdt/ext/rawspeed/src/librawspeed/adt/Mutex.h:27:10: fatal error: 
      'omp.h' file not found
#include <omp.h> // for omp_destroy_lock, omp_init_lock
         ^~~~~~~
1 error generated.
 

I started with a new image of ubuntu (18.x)

Do you have OpenMP installed?