You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dtype selective build: check if portable/optimized in deps
When dtype selective build is enabled:
Show a warning if kernel_deps does not contain portable/optimized
Error out if deps contains portable/optimized, and it is also in kernel_deps.
Differential Revision: [D74922471](https://our.internmc.facebook.com/intern/diff/D74922471/)
[ghstack-poisoned]
message="Dtype selective build requires that the portable library is not passed into `deps`. Please remove it from `deps` and place it into `kernel_deps`"
message="Dtype selective build requires that the optimized library is not passed into `deps`. Please remove it from `deps` and place it into `kernel_deps`"
Checks if child is a transitive dependency of parent and fails if it is.
905
+
The query runs the equivalent of `buck2 uquery "allpaths(parent, child)".
906
+
The path from parent->child is available in the out file and error message.
907
+
"""
908
+
message="Dependency violation: '{}' should not depend on '{}'. {}".format(parent, child, message)
909
+
910
+
ifparent==child:
911
+
fail(message)
912
+
913
+
runtime.genrule(
914
+
name=name,
915
+
macros_only=False,
916
+
cmd='mkdir -p $OUT;paths="$(query_targets allpaths({}, {}))"; echo "$paths" > $OUT/dep.txt; if [ -z "$paths" ]; then echo "Dependencies look good"; else echo {}. This will cause duplicate symbol errors when building with dtype selective build. The dependency path is: "$paths"; fail; fi'.format(parent, child, message),
917
+
define_static_target=False,
918
+
# The path is saved to $OUT/dep.txt and can be accessed via genrule_name[result].
0 commit comments