rocSOLVER icon indicating copy to clipboard operation
rocSOLVER copied to clipboard

[Feature]: Replace fmt:: with std::

Open trixirt opened this issue 8 months ago • 4 comments

Suggestion Description

The fmt package is not available on all linux distros. So the requirement here https://github.com/ROCm/rocSOLVER/blob/develop/CMakeLists.txt#L67 This will fail for RHEL and OracleLinux

the fmt::format and fmt::print calls should be replaced with std::format and std::print

Operating System

No response

GPU

No response

ROCm Component

No response

trixirt avatar Apr 05 '25 16:04 trixirt

Hey @trixirt, thank you for the suggestion! I am not sure if it will fail on RHEL and Oracle Linux, since FMT is available from epel repository. You can also build it from source https://github.com/fmtlib/fmt. Hope this helps. Thanks!

tcgu-amd avatar Apr 10 '25 14:04 tcgu-amd

A requirement is not to use EPEL as EPEL is not supported, whereas RHEL's libstdc++ is supported.

trixirt avatar Apr 10 '25 14:04 trixirt

@trixirt, thanks for your input. However, since our software is cross-platform, switching away from fmt based solely on Red Hat's packaging isn't viable. The fmt library is widely adopted and actively maintained. Being from EPEL doesn't necessarily compromise its quality or our ability to support it. We will be happy to address any specific bugs/issues related to fmt if any rises. Hope this makes ense.

tcgu-amd avatar Apr 10 '25 14:04 tcgu-amd

When I added the rocsolver dependency on fmtlib for fmt::format and fmt::print in #236, the std::format function was recently standardized but not yet implemented in the standard library and std::print was merely a proposal. One of the reasons why I chose fmtlib was that one day it could be replaced by the standard library and the fmtlib dependency could be dropped.

Until std::print is available on all the platforms we support, there would need to be a transition period in which rocsolver supports both fmt::print and std::print. We can probably alias them both to rocsolver::print or something like that.

Nobody from the rocSOLVER team has chimed in on this discussion, and I don't want to speak for them (as I'm no longer officially a rocSOLVER developer), but I think this would probably be a nice to have feature. I'd be happy to review any PRs submitted for this.

cgmb avatar May 01 '25 19:05 cgmb

This issue has been migrated to: https://github.com/ROCm/rocm-libraries/issues/1674

Imported to ROCm/rocm-libraries

ammallya avatar Sep 18 '25 18:09 ammallya