tt-metal: [BOUNTY $200] poor error messages during build failure due to invalid formatting of defines

I made an error in my program setting up the defines:

        std::map<string, string> dispatch_defines = {
            {"UPSTREAM_NOC_X", std::to_string(phys_spoof_prefetch_core.x)},
            {"UPSTREAM_NOC_Y", std::to_string(phys_spoof_prefetch_core.y)},
            {"MY_NOC_X", std::to_string(phys_dispatch_core.x)},
            {"MY_NOC_Y", std::to_string(phys_dispatch_core.y)},
            {"DOWNSTREAM_NOC_X", {0}}, // oops, should be a string
            {"DOWNSTREAM_NOC_Y", {0}}, // oops, should be a string
        };

build failed with:

riscv32-unknown-elf-g++: fatal error: no input files
compilation terminated.

Guessing the {0} turned into a NULL that terminated the define string early? At any rate, we should detect this and give a better error.

And write a test and add that to tests/tt_metal/tt_metal/api/test_compile.cpp (file doesn’t exist yet)

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 21 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@cguerreroTT still working on it, will make an update soon, sorry for the delay!

Draft will be up today