-
Notifications
You must be signed in to change notification settings - Fork 92
[ meson ] remove hard code path in meson script @open sesame 12/23 15:55 #2833
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
[ meson ] remove hard code path in meson script @open sesame 12/23 15:55 #2833
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
meson.build
Outdated
# This meson tries to find its installation. | ||
# 1. Checking /usr/include/ | ||
# 2. Checking path meson-option specifies | ||
biqgemm_path = '/usr/include/BiQGEMM' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to https://mesonbuild.com/Builtin-options.html
biggemm_path = join_paths(prefix, includedir, `BiQGEMM`)
If someone cross-compiles nntrainer with biqgemm, this is going to be critical.
nntrainer/tensor/meson.build
Outdated
@@ -80,7 +80,7 @@ if get_option('enable-biqgemm') | |||
tensor_headers += 'bcq_tensor.h' | |||
tensor_sources += 'bcq_tensor.cpp' | |||
nntrainer_inc += biqgemm_inc | |||
nntrainer_inc_abs += meson.source_root() / '..' / 'BiQGEMM' | |||
nntrainer_inc_abs += meson.source_root() / biqgemm_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs = import('fs')
if fs.is_absolete(biqgemm_path)
nntrainer_inc_abs += biqgemm_path
else
nntrainer_inc_abs += meson.source_root() / biqgemm_path
endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review. I missed the case. I updated the commit based on your comments. Thank you :)
f6ac831
to
3f4b6b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- In the previous version, meson.build contains absolute path for the BiQGEMM enablement, which is undesirable. - This commit updates the meson build script including the top meson and tensor meson by adding meson_option and the step to search the default path. Self-evaluation: Build test: [X]Passed [ ]Failed [ ]Skipped Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Eunju Yang <ej.yang@samsung.com>
3f4b6b4
to
ba5447c
Compare
Self-evaluation:
Build test: [X]Passed [ ]Failed [ ]Skipped
Run test: [X]Passed [ ]Failed [ ]Skipped