About developing minimal dwcgf demos

Please provide the following info (tick the boxes after creating this topic):
Software Version
[] DRIVE OS 6.0.6
Target Operating System
[
] Linux

Hardware Platform
[*] DRIVE AGX Orin Developer Kit (not sure its number)

SDK Manager Version
[* ] 1.9.2.10884

Host Machine Version
[*] native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
other

according to cgf_getting_started.html
Currently there is a cgf sample in /usr/local/driveworks-<version>/src/cgf which demostrates many features of the cgf. But we need more details to develop applications based on this new framework.

Due to the fact of closing source of this CGFDemo, we decide to create some minimal testing demo to check the usage of run_cgf.sh, launcher, LoaderLite, ScheduleManager, and so on. And we have many qsts.

  1. is there any development tutorials about dwcgf or is there any plan in your roadmap?
  2. what’s the best practice to launch a cgf app, is it the /bin/launcher?
  3. how to terminate the cgf app cleanly, because we found that the log thread didn’t endup after the launcher ends.

I will add and update this list in this topic.

If you need, we would like to provide our testing code in this forum.

Looking forward to your reply.

Thanks!

Dear @lizhensheng,
you can launch bgf demo app as sudo ./run_cgf.sh .
Did you check Compute Graph Framework SDK Reference: Tutorials

we found that the log thread didn’t endup after the launcher ends.

May I know how you verified this? You mean after closing demo app, you notice any thread running in top?

@SivaRamaKrishnaNV

Could you answer my questions one by one?
May my question be answered briefly first and then explained with details ?

I will show you the testing code after the details are ready.

Dear @lizhensheng,

  1. is there any development tutorials about dwcgf or is there any plan in your roadmap?

If you want to add new Node, you may check Compute Graph Framework SDK Reference: Implement a C++ Node

    1. what’s the best practice to launch a cgf app, is it the /bin/launcher?

Yes. you may use run_cgf.sh with relavant input files.

  1. how to terminate the cgf app cleanly, because we found that the log thread didn’t endup after the launcher ends

May I know how you verified this? You mean after closing demo app, you notice any thread running in top ?

1 Like

thanks for your reply.

The demo code I created is in ZhenshengLee/nv_driveworks_demo (github.com) and this reply is the same as this issue [BUG] The dwcgf helloworld app doesn’t exit gracefully with Ctrl-C. · Issue #1 · ZhenshengLee/nv_driveworks_demo (github.com)

Could you checkout the code and try to make the minimal cgf demo work with full functionality?

Describe the bug

To Reproduce

build with the docker image with the instruction in the README.md

# goto target system which is orin devkit
cd ./nv_driveworks_demo/target/aarch64/install/example/dwcgf_helloworld/bin/
sudo ./run_cgf.sh

then the log continue to grow in ./LogFolder
Ctrl-C to try to terminate gracefully.

Expected behavior

The app can exit cleanly

Actual behavior

  • the app continue to output in the terminal, and doesn’t react to SIGINT signal
  • and the log files continue to grow

Additional context

I already read the whole docs and tutorials in the website of the dwcgf.

Dear @lizhensheng,
Thanks for sharing code. We will check internally on get back to you on this.

There is a new situation here. @SivaRamaKrishnaNV

Describe the bug

To Reproduce

# goto target system which is orin devkit
cd ./nv_driveworks_demo/target/aarch64/install/example/dwcgf_helloworld/bin/
sudo ./run_cgf.sh

the app can run successfully, and output some logs. we can see log files continue to grow in ./LogFolder

the app cannot exit successfully, then Ctrl-Q the terminal, reboot the orin-devkit

Expected behavior

we can run helloworld cgf demo after rebooting the orin-kit.

Actual behavior

The CUDA driver is corrupted and /usr/local/driveworks/bin/sample_hello_world failed.

nvidia@tegra-ubuntu:~/myz/bin$ /usr/local/driveworks/bin/sample_hello_world
*************************************************
Welcome to Driveworks SDK
[30-01-2023 12:22:07] Platform: Detected Drive Orin P3710
[30-01-2023 12:22:07] TimeSource: monotonic epoch time offset is 1675079443679635
[30-01-2023 12:22:07] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[30-01-2023 12:22:07] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[30-01-2023 12:22:07] PTP Time is available from Eth Driver
[30-01-2023 12:22:07] Adding variable DW_Base:DW_Version
[30-01-2023 12:22:07] Added variable DW_Base:DW_Version
libnvrm_gpu.so: NvRmGpuLibOpen failed, error=14
[30-01-2023 12:22:08] Driveworks exception thrown: Platform: cannot retrieve GPU device count.. Error cudaErrorUnknown: unknown error

Cannot init SDK

Additional context

After reflashing the DriveOS SDK using sdk-manager, the sample_hello_world works again.
But running run_cgf.sh actually damanges the cuda driver env. So we must reflash the orin-kit again.

Dear @lizhensheng,
Does that mean, running your sample application corrupt the cuda drivers and reflashing fix the issue? If so, this behavior is strange.

Yes, you are right. This is the minimal cgf demo that I try to run, everything is derived from the CGFDemo Project, which is closed source for now. The behavior of run_cgf.sh is to run launcher which is the cause of the strange behavior.

Could you repeat all behavior of this topic in your env using the helloworld demo?

It is confirmed that the this behavior of sample application corrupt the cuda drivers doesn’t happen in x86 docker development env.

Could you repeat all behavior of this topic in your env using the helloworld demo?

You mean follow the steps from Compute Graph Framework SDK Reference: Custom Node and Integration and cross compile to run on target?

Do whatever you can do to make the minimal cgf demo work and running gracefully.

Thanks.

Dear @lizhensheng,
I have followed the instructions in Compute Graph Framework SDK Reference: Custom Node and Integration . I noticed couple of documentation issues and hitting compilation issues as well. I will check internally on this issue and get back to you. Thank you for bringing it to our attention.

@SivaRamaKrishnaNV Hope that you inspect the demo here as well, thanks.

Dear @lizhensheng,
I escalated the issues related to custom node integration to core team and is under investigation. I will keep you updated. Thank you for brining to our notice.

1 Like

The helloworld demo issue is closed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.