-
Notifications
You must be signed in to change notification settings - Fork 447
Move Config Srcs into build_srcs.bzl #8631
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
base: master
Are you sure you want to change the base?
Conversation
build_srcs.bzl
Outdated
| "src/xnnpack/vunary.h", | ||
| ] | ||
|
|
||
| UKERNEL_CONFIG_SRCS = [ |
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.
Nit: I think this should be MICROKERNEL_CONFIG_SRCS for consistency with e.g. MICROKERNEL_DEPS, MICROKERNEL_HDRS.
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.
yea that makes sense.
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.
ed52043 to
f150b0c
Compare
f150b0c to
6c9990a
Compare
6c9990a to
906ead5
Compare
| hdrs = [ | ||
| "//:src/xnnpack/config.h", | ||
| ], | ||
| srcs = MICROKERNEL_CONFIG_SRCS, |
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.
Is reduce-config.c and unary-elementwise-config.c getting compiled twice now?
Can src/pack-lh.c just depend on all the configs, rather than treating the reduce and unary elementwise configs as "special"?
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.
That won't work because pack-lh-config, which is also in this target, depends on pack-lh, and that would cause a circular dependency.
|
What is the purpose of removing the granular targets in I'm asking because I only recently split these out because it's best practices to have as granular targets as possible (see e.g. here). |
|
I've sent #8664 which should eliminate the special case requirements of pack-lh, which would enable this PR to work as it was originally sent. If sharing the BUILD becomes easier due to this change (a single BUILD target with a variable for the config srcs), then I don't think we should worry about bazel's guidelines @mcr229. |
|
@mcr229 I'm still confused about the intent of this change. If you need the list of config files, it's just the source files in The granular targets were part of an ongoing larger refactoring trying to put things in specific subdirectories to avoid having to have lists of sources ( |
|
@gonnet I didn't know that separating these build targets was an active effort. Honestly the level of separation of all MICROKERNEL_CONFIG srcs living in |
|
@mcr229 That is fortunately almost already the current state, and I have an open Issue to clean things up. If it makes your build process simpler and/or easier to manage, I can prioritize wrapping up this work and get your feedback on the changes. |
Light refactoring to move config srcs into build_srcs.bzl