Replies: 3 comments 2 replies
-
Hi, yes I'm looking at ways to create the appropriate wrappers for Fortran from the C headers provided with iso_c_binding. F2PY is not an option, the objective is to work directly on Fortran not on python. I'm not sure what did you ment with CAF? I'm only familiar with CAF for CoArray Fortran, which is a framework for distributed parallel computing directly in the language. |
Beta Was this translation helpful? Give feedback.
-
Yes, there are options available to use ONNX directly from Fortran code. Here are some possible approaches: Using C-Fortran interoperability: ONNX provides C bindings, and Fortran code can use C bindings through the interoperability features provided by the Fortran standard. You can create a Fortran wrapper around the ONNX C bindings to expose them to Fortran code. Using a Fortran-to-C compiler: You can use a Fortran-to-C compiler, such as f2c or gfortran, to convert your Fortran code to C code, and then use the ONNX C bindings directly from the resulting C code. Using a C-Fortran interface library: You can use a C-Fortran interface library, such as fwrap or cfortran, to create a Fortran wrapper around the ONNX C bindings. These libraries simplify the process of creating C-Fortran interfaces and provide a more Fortran-friendly API. In general, the best approach will depend on your specific requirements and constraints. If you can provide more details about your use case, I may be able to provide more specific guidance. |
Beta Was this translation helpful? Give feedback.
-
There are several API wrappers available for Fortran, such as F2PY, SWIG, and CMake Fortran API. The choice of wrapper depends on the specific requirements of the project. |
Beta Was this translation helpful? Give feedback.
-
Hi, I was wondering if there is any activity that could help using onnx directly from Fortran code? This could be very useful for HPC applications using Fortran as the code base. I'm currently looking at how to create a minimal wrapper, any help/guidance here would be very much appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions