Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native -Wno-sign-compare]:
Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
--config=mkl # Build with MKL support.
--config=monolithic # Config for mostly static monolithic build.
--config=gdr # Build with GDR support.
--config=verbs # Build with libverbs support.
--config=ngraph # Build with Intel nGraph support.
--config=numa # Build with NUMA support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
--config=v2 # Build TensorFlow 2.x instead of 1.x.
Preconfigured Bazel build configs to DISABLE default on features:
--config=noaws # Disable AWS S3 filesystem support.
--config=nogcp # Disable GCP support.
--config=nohdfs # Disable HDFS support.
--config=noignite # Disable Apache Ignite support.
--config=nokafka # Disable Apache Kafka support.
--config=nonccl # Disable NVIDIA NCCL support.
Configuration finished
oneDNN 是 Intel 开源的跨平台深度学习性能加速库,通过 文档 可以了解到被支持的原语,DeepRec 中已经加入了 oneDNN 的支持,只需要在 DeepRec 编译命令中加入关于 oneDNN 的编译选项:--config=mkl_threadpool 即可开启 oneDNN 加速算子计算。在支持 AVX512 指令集的机器(Sky Lake 及其之后的 CPU)上添加 --config=opt 选项,默认会打开 --copt=-march=native 的优化,可以进一步加速算子计算性能。
Tips: MKL-DNN 被重命名为 DNNL,之后又被重命名为 oneDNN;TensorFlow 初期采用的是 MKL 加速算子计算,在之后的版本迭代中,逐步使用 oneDNN 替换了 MKL,但宏定义还是仍然保留。