Skip to content

[BUG] Unexpected behaviour on Nvidia Jetson Orin #899

@SamDSchofield

Description

@SamDSchofield

Describe the Bug
MatX code that appears to work correctly on my desktop machine works incorrectly (operations returns all zeros) when running on my Jetson Orin AGX (Jetpack 6.0).

To Reproduce
Run the following code on a Jetson

#include <matx.h>

int main(int argc, char **argv) {
    auto a = matx::make_tensor<float>({3, 3});
    auto b = matx::make_tensor<float>({3, 3});

    a.SetVals({{1,2,3}, {4,5,6}, {7,8,9}});

    (b = 2*a).run();

    matx::print(a);
    matx::print(b);
}

Expected Behavior
The code should output (result on my desktop machine):

Tensor{float} Rank: 2, Sizes:[3, 3], Strides:[3,1]
000000:  1.0000e+00  2.0000e+00  3.0000e+00 
000001:  4.0000e+00  5.0000e+00  6.0000e+00 
000002:  7.0000e+00  8.0000e+00  9.0000e+00 
Tensor{float} Rank: 2, Sizes:[3, 3], Strides:[3,1]
000000:  2.0000e+00  4.0000e+00  6.0000e+00 
000001:  8.0000e+00  1.0000e+01  1.2000e+01 
000002:  1.4000e+01  1.6000e+01  1.8000e+01 

Instead, it outputs (on Jetson):

tensor_2_f32: Tensor{float} Rank: 2, Sizes:[3, 3], Strides:[3,1]
000000:  1.0000e+00  2.0000e+00  3.0000e+00 
000001:  4.0000e+00  5.0000e+00  6.0000e+00 
000002:  7.0000e+00  8.0000e+00  9.0000e+00 
tensor_2_f32: Tensor{float} Rank: 2, Sizes:[3, 3], Strides:[3,1]
000000:  0.0000e+00  0.0000e+00  0.0000e+00 
000001:  0.0000e+00  0.0000e+00  0.0000e+00 
000002:  0.0000e+00  0.0000e+00  0.0000e+00 

System Details (please complete the following information):

  • OS: Jetpack 6.0
  • CUDA version: 12.6.68
  • g++ version: 11.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions