Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguous call to nvtx3::payload::payload() on macOS #471

Closed
Jacobfaib opened this issue Sep 24, 2024 · 4 comments · Fixed by #474
Closed

Ambiguous call to nvtx3::payload::payload() on macOS #471

Jacobfaib opened this issue Sep 24, 2024 · 4 comments · Fixed by #474

Comments

@Jacobfaib
Copy link
Contributor

Jacobfaib commented Sep 24, 2024

/Users/jfaibussowit/soft/nv/legate.core.internal/arch-io/cmake_build/_deps/kvikio-src/cpp/include/kvikio/posix_io.hpp:276:3: error: call to constructor of 'nvtx3::payload' is ambiguous
  276 |   KVIKIO_NVTX_FUNC_RANGE("posix_host_read()", size);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jfaibussowit/soft/nv/legate.core.internal/arch-io/cmake_build/_deps/kvikio-src/cpp/include/kvikio/utils.hpp:309:18: note: expanded from macro 'KVIKIO_NVTX_FUNC_RANGE'
  308 |   GET_KVIKIO_NVTX_FUNC_RANGE_MACRO(                                  \
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  309 |     __VA_ARGS__, KVIKIO_NVTX_FUNC_RANGE_2, KVIKIO_NVTX_FUNC_RANGE_1) \
      |     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  310 |   (__VA_ARGS__)
      |   ~~~~~~~~~~~~~
/Users/jfaibussowit/soft/nv/legate.core.internal/arch-io/cmake_build/_deps/kvikio-src/cpp/include/kvikio/utils.hpp:286:61: note: expanded from macro 'GET_KVIKIO_NVTX_FUNC_RANGE_MACRO'
  286 | #define GET_KVIKIO_NVTX_FUNC_RANGE_MACRO(_1, _2, NAME, ...) NAME
      |                                                             ^
/Users/jfaibussowit/soft/nv/legate.core.internal/arch-io/cmake_build/_deps/kvikio-src/cpp/include/kvikio/utils.hpp:283:12: note: expanded from macro 'KVIKIO_NVTX_FUNC_RANGE_2'
  283 |       msg, nvtx3::payload { val }                             \
      |            ^              ~~~~~~~

On macOS, std::size_t is unsigned long, which -- crucially -- is not std::uint64_t (unsigned long long).

Perhaps consider doing

KVIKIO_NVTX_FUNC_RANGE("posix_host_read()", std::uint64_t{size});

whenever size is std::size_t. Alternatively, the macro could be amended to do this automatically.

@madsbk
Copy link
Member

madsbk commented Sep 25, 2024

Hmm, nvtx3::payload should have an overload for nvtx3::payload(uint32_t value).

How does the nvtx3::payload class looks like in macOS?

@Jacobfaib
Copy link
Contributor Author

Jacobfaib commented Sep 25, 2024

Hmm, nvtx3::payload should have an overload for nvtx3::payload(uint32_t value).

Aye, it does, but uint32_t != unsigned long != std::size_t on macOS either :), uint32_t is unsigned int.

@madsbk
Copy link
Member

madsbk commented Sep 25, 2024

Does #474 fix it?

@rapids-bot rapids-bot bot closed this as completed in #474 Sep 30, 2024
@rapids-bot rapids-bot bot closed this as completed in 35ec784 Sep 30, 2024
@Jacobfaib
Copy link
Contributor Author

Sorry for late reply, yes it does, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants