microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
cmake/noexcep_ops.cmake
20lines · modecode
| 1 | # If the oeprator needs the cpp exceptions supports, write down their names |
| 2 | if (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") |
| 6 | endif() |
| 7 | if (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") |
| 11 | endif() |
| 12 | if (OCOS_ENABLE_BLINGFIRE) |
| 13 | message(STATUS "BLINGFIRE operator needs c++ exceptions support, enable exceptions by default!") |
| 14 | endif() |
| 15 | if (OCOS_ENABLE_SPM_TOKENIZER) |
| 16 | message(FATAL_ERROR "SPM_TOKENIZER operator needs c++ exceptions support") |
| 17 | endif() |
| 18 | if (OCOS_ENABLE_OPENCV) |
| 19 | message(FATAL_ERROR "the operators depending on opencv needs c++ exceptions support") |
| 20 | endif() |
| 21 | |