Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[µTVM] Zephyr: Fix missing board-specific config file in build dir #8230

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

gromero
Copy link
Contributor

@gromero gromero commented Jun 9, 2021

Hi,

Could the following small change be reviewed please?

It's necessary to make the build of the libraries (common, utvm_rpc_common, utvm_rpc_server, etc) be aware of board-specific config settings, like per board CONFIG_FPU (since some boards, like mps2, don't have a FPU and currently it's set globally in prj.conf). It's also necessary to move forward the following PR:
#8055

Without that change, for instance, even if CONFIG_FPU=y is set in the board config file (like boards/qemu_x86.conf) the libraries are built against soft-float because CONFIG_FPU=y doesn't take effect and so running some models that rely on float point will fail.

This happens because currently board-specific config files (boards/*.conf) are not
copied from Zephyr project dir to the destination build dir, so
as a consequence the per board configs are not used when building
the runtime libraries, like libcommon. Hence, for instance, it's
currently not possible to set CONFIG_FPU per board since it only
takes effect when it's set in the generic 'prj.con' config file.

This commit fixes it by copying to the build dir, to each lib
dir, the proper .conf for the selected target board. For example,
if target 'qemu_x86' is selected 'qemu_x86.conf' is copied to
the boards/ dir inside the lib dirs, so Zephyr build system can
find it and combine it with configs found in the generic 'prj.conf'.

Thanks & best regards,
Gustavo

@gromero
Copy link
Contributor Author

gromero commented Jun 10, 2021

@areusch Hi! Any clue if the CI error is legit or not? Seems quite unrelated to my change. I don't have a GPU to try it out locally unfortunately so I'll need a hand to figure it out : )

@areusch
Copy link
Contributor

areusch commented Jun 10, 2021

thanks @gromero , hopefully Project API will obviate this change since we'll just be using a single project, but let's merge in the meantime. unfortunately the CI error looks unrelated/flaky, can you just push an empty commit or git commit --amend to retrigger?

Currently board-specific config files (boards/*.conf) are not
copied from Zephyr project dir to the destination build dir, so
as a consequence the per board configs are not used when building
the runtime libraries, like libcommon. Hence, for instance, it's
currently not possible to set CONFIG_FPU per board since it only
takes effect when it's set in the generic 'prj.con' config file.

This commit fixes it by copying to the build dir (to each lib
dir) the proper .conf for the selected target board. For example,
if target 'qemu_x86' is selected 'qemu_x86.conf' is copied to
the boards/ dir inside the lib dirs, so Zephyr build system can
find it and combine it with configs found in the generic 'prj.conf'.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
@masahi masahi merged commit c29301e into apache:main Jun 11, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 17, 2021
…pache#8230)

Currently board-specific config files (boards/*.conf) are not
copied from Zephyr project dir to the destination build dir, so
as a consequence the per board configs are not used when building
the runtime libraries, like libcommon. Hence, for instance, it's
currently not possible to set CONFIG_FPU per board since it only
takes effect when it's set in the generic 'prj.con' config file.

This commit fixes it by copying to the build dir (to each lib
dir) the proper .conf for the selected target board. For example,
if target 'qemu_x86' is selected 'qemu_x86.conf' is copied to
the boards/ dir inside the lib dirs, so Zephyr build system can
find it and combine it with configs found in the generic 'prj.conf'.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jun 17, 2021
…pache#8230)

Currently board-specific config files (boards/*.conf) are not
copied from Zephyr project dir to the destination build dir, so
as a consequence the per board configs are not used when building
the runtime libraries, like libcommon. Hence, for instance, it's
currently not possible to set CONFIG_FPU per board since it only
takes effect when it's set in the generic 'prj.con' config file.

This commit fixes it by copying to the build dir (to each lib
dir) the proper .conf for the selected target board. For example,
if target 'qemu_x86' is selected 'qemu_x86.conf' is copied to
the boards/ dir inside the lib dirs, so Zephyr build system can
find it and combine it with configs found in the generic 'prj.conf'.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants