diff --git a/rfcs/20240808-graph-api-int-compression-for-sdpa/README.md b/rfcs/20240808-graph-api-int-compression-for-sdpa/README.md index 30b5c966b63..1b7ef34dc68 100644 --- a/rfcs/20240808-graph-api-int-compression-for-sdpa/README.md +++ b/rfcs/20240808-graph-api-int-compression-for-sdpa/README.md @@ -277,14 +277,26 @@ the design of floating point math mode also helps to maintain a consistent API semantics between graph API and primitive API. Currently, oneDNN Graph API supports setting floating-point math mode during the -construction of graph object, which will affect the whole graph. The API is -like: +construction of graph object, which will affect the whole graph. + +As primitive API has supported a second argument for enforcing an integral +primitive to comply with the floating-point math mode, oneDNN Graph API need to +accommodate to the change. The new API will be like: + +```cpp +/// @param engine_kind Engine kind. +/// @param mode Floating-point math mode. +/// @param apply_to_int Use of floating-point arithmetic for integer primitives. +graph(engine::kind engine_kind, fpmath_mode mode, bool apply_to_int = false); +``` + +Users can use the new API like: ```cpp using namespace dnnl::graph; // Specify math_mode while constructing the graph -graph g(kind, math_mode); +graph g(kind, math_mode, /*apply_to_int=*/true); op foo(id, kind, "foo"); g.add_op(foo); op bar(id, kind, "bar"); g.add_op(bar); g.finalize();