ROCm / hipfort

Fortran interfaces for ROCm libraries
https://rocm.docs.amd.com/projects/hipfort/en/latest/
Other
68 stars 37 forks source link

Documentation changes for Latex formula #117

Closed samjwu closed 1 year ago

samjwu commented 1 year ago

closes https://github.com/RadeonOpenCompute/rocm-docs-core/issues/311

use \newline instead of double backslash for latex since gfortran interprets it as single backslash

cgmb commented 1 year ago

This may be a reasonable workaround, but I don't think this closes the rocm-docs-core issue. Why is rocm-docs-core changing these files when it copies them into its working directory?

samjwu commented 1 year ago

https://advanced-micro-devices-demo--117.com.readthedocs.build/projects/hipfort/en/117/doxygen/html/interfacehipfort__hipblas_1_1hipblaszgetrs.html

samjwu commented 1 year ago

This may be a reasonable workaround, but I don't think this closes the rocm-docs-core issue. Why is rocm-docs-core changing these files when it copies them into its working directory?

This is less a rocm-docs-core function and more gfortran function. The workflow here is specific to hipfort:

The copy over issue is in step 1, because gfortran treats it as an escape character and processes the double backslash as a single backslash, but that is also interfering with the new lines. I've tried using the -fbackslash flag with gfortran, but I guess the latex syntax confused it since it resulted in the same error when using the double backslash, so this was the workaround I came up with.

cgmb commented 1 year ago

Thanks for the clear description, @samjwu!

  • gfortran preprocesses the source fortran code

What is the purpose of this step? Perhaps you've explained it to me before, but if so, I have forgotten.

samjwu commented 1 year ago

Thanks for the clear description, @samjwu!

  • gfortran preprocesses the source fortran code

What is the purpose of this step? Perhaps you've explained it to me before, but if so, I have forgotten.

That step appears to have been done by @Maetveis in https://github.com/ROCmSoftwarePlatform/hipfort/pull/99 because doxygen doesn't seem to correctly parse the source fortran code, even with preprocessing turned on and with upper-case file names as convention