microsoft/onnxruntime-extensions

Public

mirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
9baed694a34dcb074db66e9f74c93a4e5bb6f9a2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

cmake/noexcep_ops.cmake

20lines · modecode

1# If the oeprator needs the cpp exceptions supports, write down their names
2if (OCOS_ENABLE_GPT2_TOKENIZER)
3 # gpt2 tokenizer depends on nlohmann_json in onnxruntime, which is old and cannot disable exceptions.
4 # could remove this limit when the nlohmann_json is updated in onnxruntime.
5 message(FATAL_ERROR "GPT2_TOKENIZER operator needs c++ exceptions support")
6endif()
7if (OCOS_ENABLE_WORDPIECE_TOKENIZER)
8 # wordpiece tokenizer depends on nlohmann_json in onnxruntime, which is old and cannot disable exceptions.
9 # could remove this limit when the nlohmann_json is updated in onnxruntime.
10 message(FATAL_ERROR "WORDPIECE_TOKENIZER operator needs c++ exceptions support")
11endif()
12if (OCOS_ENABLE_BLINGFIRE)
13 message(STATUS "BLINGFIRE operator needs c++ exceptions support, enable exceptions by default!")
14endif()
15if (OCOS_ENABLE_SPM_TOKENIZER)
16 message(FATAL_ERROR "SPM_TOKENIZER operator needs c++ exceptions support")
17endif()
18if (OCOS_ENABLE_OPENCV)
19 message(FATAL_ERROR "the operators depending on opencv needs c++ exceptions support")
20endif()
21