github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/third_party/mkl_dnn/build_defs.bzl (about) 1 def if_mkl_open_source_only(if_true, if_false = []): 2 """Returns `if_true` if MKL-DNN v0.x is used. 3 4 Shorthand for select()'ing on whether we're building with 5 MKL-DNN v0.x open source library only, without depending on MKL binary form. 6 7 Returns a select statement which evaluates to if_true if we're building 8 with MKL-DNN v0.x open source library only. Otherwise, the select statement 9 evaluates to if_false. 10 11 """ 12 return select({ 13 str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_true, 14 "//conditions:default": if_false, 15 }) 16 17 def if_mkl_v1_open_source_only(if_true, if_false = []): 18 """Returns `if_true` if MKL-DNN v1.x is used. 19 20 Shorthand for select()'ing on whether we're building with 21 MKL-DNN v1.x open source library only, without depending on MKL binary form. 22 23 Returns a select statement which evaluates to if_true if we're building 24 with MKL-DNN v1.x open source library only. Otherwise, the 25 select statement evaluates to if_false. 26 27 """ 28 return select({ 29 str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_v1_only")): if_true, 30 "//conditions:default": if_false, 31 })