The name TensorFloat-32 is clearer than TF32, as the "TF" in TF32 may be confused for TensorFlow. Also replace word "allow" with "enable" in internal functions like "allow_tf32_execution" to match the Python API PiperOrigin-RevId: 330621742 Change-Id: I3f5518aecf4f946d241b422e6a4d566fa199185f
23 lines
957 B
C++
23 lines
957 B
C++
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
==============================================================================*/
|
|
|
|
#include "pybind11/pybind11.h"
|
|
#include "tensorflow/core/platform/tensor_float_32_utils.h"
|
|
|
|
PYBIND11_MODULE(_pywrap_tensor_float_32_execution, m) {
|
|
m.def("enable", &tensorflow::enable_tensor_float_32_execution);
|
|
m.def("is_enabled", &tensorflow::tensor_float_32_execution_enabled);
|
|
}
|