-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Description
Issue description
Recently, it was discovered that some hip kernels prefer to use global namespace vs std namespace for various math functions. There was a recent issue being discussed where the use of global namespace math functions was causing minor accuracy issues on ROCm. Please reference said issue comment for more background: #96560 (comment)
After some internal investigation it was found that the global namespace was chosen in accordance CUDA documentation:
https://docs.nvidia.com/cuda/cuda-math-api/index.html
Note also that due to implementation constraints, certain math functions from std:: namespace may be callable in device code even via explicitly qualified std:: names. However, such use is discouraged, since this capability is unsupported, unverified, undocumented, not portable, and may change without notice.
There have also been other issues related to this where the std namespace seems to be generally prioritized when, according to the above documentation, it shouldn't
#127812
So I wanted to open a discussion as to why CUDA kernels are prioritizing the std namespace over the global namespace?
Should we standardize to global namespace for consistency?
cc @ptrblck @msaroufim @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang
Metadata
Metadata
Assignees
Labels
Type
Projects
Status