[Backend] Add fp16 support for ONNXRuntime-GPU (#1239)

* add fp16 support for ort-gpu

* add enable_ort_fp16 option

* fix

* fix bugs

* use fp16 for test

* update code

* update code

* fix windows bug
This commit is contained in:
yeliang2258
2023-03-23 18:23:13 +08:00
committed by GitHub
parent b62912ff9c
commit cae341e6c5
9 changed files with 67 additions and 24 deletions

View File

@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "fastdeploy/pybind/main.h"
#include "fastdeploy/runtime/backends/ort/option.h"
#include "fastdeploy/pybind/main.h"
namespace fastdeploy {
@@ -28,7 +28,8 @@ void BindOrtOption(pybind11::module& m) {
&OrtBackendOption::inter_op_num_threads)
.def_readwrite("execution_mode", &OrtBackendOption::execution_mode)
.def_readwrite("device", &OrtBackendOption::device)
.def_readwrite("device_id", &OrtBackendOption::device_id);
.def_readwrite("device_id", &OrtBackendOption::device_id)
.def_readwrite("enable_fp16", &OrtBackendOption::enable_fp16);
}
} // namespace fastdeploy