Mojo on Jetson Orin

hello folks, I tried building a basic NMS (non max suppression) kernel in Mojo to run on Jetson Orin. After a lot of struggles I got the code to compile. But now the code crashes and I get this message.

opendir /home/pradeep/dev/mojo_fast_nms/.pixi/envs/default/share/max/crashdb/attachments/5c6a8096-7af3-4648-879e-572dede39972: No such file or directory (2)
Please submit a bug report to https://github.com/modular/modular/issues and include the crash backtrace along with all the relevant source codes.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  mojo                      0x0000aaaacd9325c0
1  mojo                      0x0000aaaacd93058c
2  mojo                      0x0000aaaacd932ce4
3  linux-vdso.so.1           0x0000ffffa041e7bc __kernel_rt_sigreturn + 0
4  libc.so.6                 0x0000ffff9d32f200
5  libc.so.6                 0x0000ffff9d2ea67c raise + 28
6  libAsyncRTMojoBindings.so 0x0000ffff9f3edc4c
7  linux-vdso.so.1           0x0000ffffa041e7bc __kernel_rt_sigreturn + 0
8  (error)                   0x0000ffff85293518
mojo crashed!
Please file a bug report.

I could try this on another GPU but short of that, any other pointers will greatly help. Thank you. Here is the code.

1 Like

As one data point: this crashes also on an RTX 4060, in addition to my Jetson Orin Nano, so I don’t think it’s Nano-specific. I’ll see if there’s anything that jumps out to me in the layout, etc.

A few questions about the use of Layout. You defined

alias BoxLayout   = Layout.row_major(4)
alias ScoreLayout = Layout.row_major(1)

It means that Box has 4 elements and Score has 1 element. I’m wondering if that’s what you intend to do? Also, in

fn nms_bitmask_kernel[T: DType](
    boxes:  LayoutTensor[T,        BoxLayout],      # [N,4]
    scores: LayoutTensor[T,        ScoreLayout],    # [N,1] (already DESC sorted)
    mask:   LayoutTensor[mut=True, DType.uint32]

The mask argument does not have a layout defined.

Thank you for the pointers

alias BoxLayout   = Layout.row_major(4)
alias ScoreLayout = Layout.row_major(1)

Ok regarding this I didn’t have much clarity on Layout row. Also vibe coding :slight_smile: so you are right.

I need 4 scores for 4 boxes. At least from what I understand. Not sure if this would cause the crash but I’ll fix it and test.

OK I didn’t realize mask should also have a Layout defined.

Let me change the code to reflect this and figure out if that solves the crashes.