onnxruntime/cmake
George Nash 0296bc74c1
oneDNN ep bf16 enabling (#13484)
### Description
 This adds bfloat16 support to the oneDNN ep.

When using the oneDNN ep this enables bfloat16 support for the following
ops:

Exp, Sigmoid, Tanh, Relu, MatMul, Gelu, BiasGelu, Add, Sub,
Mul, Div, Div, Sqrt, Pow, ReduceMean,  Abs, Cast, Equal, Exp,
FastGelu, FusedMatMul, Gemm, Greter, GreaterOrEqual, LeakyRelu,
Less, LessOrEqual, LRN, ReduceOps, Reshape, Squeeze, Transpose,
 and Unsqueeze.

LayerNorm with some internal casting. 
BatchNorm only enabled BFloat16 for input and output, scale and bias
still need fp32 input.

Added bfloat16 unit tests for all of the operators in question. When
possible we reused the already existing unit tests that were added by
CUDA and ROCM eps.

In many of the unit tests an unusual pattern will be seen 

    #if defined(USE_DNNL)
    TEST(Test, bfloat16_test) {
      #if defined(USE_DNNL)
        // oneDNN ep specific code
      #endif
       //test code
    }
    #endif

Although it looks unusual this was purposely done if another ep
implements bfloat16 support for that operator they will be able to
enable the unit test by adding there execution provider to the first
line without needing to edit inside the test.

Example: `#if defined(USE_CUDA) || defined(USE_DNNL)` see the
MatMul_float16 test in matmul_test.cc for and example of how this is
useful.

Additionally two new ISA checks (AVX512_BF16 and AMX-BF16) were added to
the cpuid_info code in. This was important to detecting is bfloat16
operations are supported by the CPU.

### Motivation and Context
This expands the capabilities of the oneDNN execution provider to
support models containing bfloat16 operations.

Signed-off-by: George Nash <george.nash@intel.com>
Signed-off-by: Ruihan-Yin <ruihan.yin@intel.com>
2022-11-04 18:25:09 -07:00
..
external Change GSL download to use HTTPS URL. (#13563) 2022-11-04 18:01:18 -07:00
patches Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
tensorboard Disable two warnings raised by tensorboard on Visual Studio (#12773) 2022-09-06 20:42:52 +02:00
CMakeLists.txt Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
CMakeSettings.json Fork the WinML APIs into the Microsoft namespace (#3503) 2020-04-17 06:18:54 -07:00
codeconv.runsettings CMake changes (#2961) 2020-02-03 19:33:14 -08:00
EnableVisualStudioCodeAnalysis.props Fix SDL warnings in CPU EP (#9975) 2021-12-19 20:54:29 -08:00
find_snpe.cmake cmake changes for SNPE EP (#11821) 2022-06-13 08:15:37 -07:00
gdk_toolchain.cmake Enable building with a GDK (#11126) 2022-04-07 15:06:31 -07:00
Info.plist.in Enable build dynamic framework for macOS/iOS (#7343) 2021-04-15 16:47:53 -07:00
libonnxruntime.pc.cmake.in cmake: support install target with generated pkg-config file (#7076) 2021-03-22 19:36:31 -07:00
nuget_helpers.cmake Fix nuget build error (#6009) 2020-12-03 09:28:39 -08:00
onnxruntime.cmake Remove miscellaneous nuphar configs (#13070) 2022-09-26 13:41:28 -07:00
onnxruntime_codegen_tvm.cmake Update our absl cmake files (#10762) 2022-03-04 09:28:04 -08:00
onnxruntime_common.cmake Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00
onnxruntime_config.h.in [wasm] update emscripten v2.0.34 (#10391) 2022-01-26 14:46:02 -08:00
onnxruntime_csharp.cmake Remove miscellaneous nuphar configs (#13070) 2022-09-26 13:41:28 -07:00
onnxruntime_eager.cmake Update our absl cmake files (#10762) 2022-03-04 09:28:04 -08:00
onnxruntime_flatbuffers.cmake Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00
onnxruntime_framework.cmake ATen Fallback for Inference (#11597) 2022-06-09 16:07:30 +08:00
onnxruntime_fuzz_test.cmake Merge CPU packaging pipelines (#6480) 2021-02-04 08:38:56 -08:00
onnxruntime_graph.cmake ONNX Protobuf natvis with some google::protobuf (#12580) 2022-08-15 09:59:07 -07:00
onnxruntime_ios.toolchain.cmake Enable build dynamic framework for macOS/iOS (#7343) 2021-04-15 16:47:53 -07:00
onnxruntime_java.cmake Add linux and macos arm64 java aritifacts (#10981) 2022-03-25 16:23:17 -07:00
onnxruntime_java_unittests.cmake [Java] Adds support for DNNL, OpenVINO, TensorRT shared providers and refactors the CUDA shared provider loader (#8013) 2021-07-20 22:33:15 -07:00
onnxruntime_kernel_explorer.cmake Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
onnxruntime_language_interop_ops.cmake Update manylinux build scripts and GPU CUDA version from 11.0 to 11.1 (#7632) 2021-06-02 23:36:49 -07:00
onnxruntime_mlas.cmake Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00
onnxruntime_nodejs.cmake Add Node.js binding support to packaging pipeline (#9577) 2021-11-05 15:29:40 -07:00
onnxruntime_objectivec.cmake [Objective-C API] Add script to assemble pod package files. (#7958) 2021-06-07 19:16:39 -07:00
onnxruntime_opschema_lib.cmake Update compliance tasks in python packaging pipeline and fix some compile warnings (#8471) 2021-07-30 17:16:37 -07:00
onnxruntime_optimizer.cmake [cmake] Export multi targets in static build (#11063) 2022-04-03 22:37:18 -07:00
onnxruntime_providers.cmake Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
onnxruntime_pyop.cmake Packaging pipeline now builds with PythonOp (aka running autograd.Function) (#8652) 2021-08-17 10:55:13 -07:00
onnxruntime_python.cmake Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
onnxruntime_rocm_hipify.cmake Drop hip_add_library (#13406) 2022-10-25 12:57:48 +08:00
onnxruntime_session.cmake Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
onnxruntime_snpe_provider.cmake cmake changes for SNPE EP (#11821) 2022-06-13 08:15:37 -07:00
onnxruntime_training.cmake Update CK and fix performance issue on dev machine (#13531) 2022-11-03 19:32:30 +08:00
onnxruntime_unittests.cmake oneDNN ep bf16 enabling (#13484) 2022-11-04 18:25:09 -07:00
onnxruntime_util.cmake [cmake] Export multi targets in static build (#11063) 2022-04-03 22:37:18 -07:00
onnxruntime_webassembly.cmake increase max memory to 4G for wasm (#12798) 2022-09-06 17:07:13 -07:00
precompiled_header.cmake Fix Windows Store build (#8753) 2021-08-23 11:19:03 -07:00
protobuf_function.cmake Sync ORTModule branch with master and fix tests (#6526) 2021-02-02 08:59:56 -08:00
Sdl.ruleset Update Sdl.ruleset to remove C26812 from the rules (#12695) 2022-09-01 20:05:20 -07:00
set_winapi_family_desktop.h Fix WCOS/Win32 linking bugs (#3126) 2020-03-19 08:52:40 -07:00
target_delayload.cmake Remove Windows Store specific code 2022-03-17 23:38:14 -07:00
uwp_stubs.h Fix Windows Store build (#8753) 2021-08-23 11:19:03 -07:00
wcos_rules_override.cmake Use onecore umbrella lib in onecore builds (#5182) 2020-09-16 10:46:27 -07:00
wil.cmake Merge windowsai (winml layering) into master (#2956) 2020-02-04 17:12:19 -08:00
winml.cmake Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00
winml_cppwinrt.cmake Fix Windows Store build (#8753) 2021-08-23 11:19:03 -07:00
winml_sdk_helpers.cmake Merge windowsai (winml layering) into master (#2956) 2020-02-04 17:12:19 -08:00
winml_unittests.cmake Switch GSL to MS GSL 4.0.0 (#13416) 2022-10-29 04:15:20 -07:00