Skip to content

Commit

Permalink
Add meta info function for AMD ROCm support
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTheBear committed Nov 9, 2023
1 parent 3b63ad7 commit 141a59e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/includes/likwid.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ extern int likwid_getMinorVersion(void) __attribute__ ((visibility ("default") )
@return Bugfix version
*/
extern int likwid_getBugfixVersion(void) __attribute__ ((visibility ("default") ));

/*! \brief Check whether the LIKWID library was built with Nvidia GPU support */
extern int likwid_getNvidiaSupport(void) __attribute__ ((visibility ("default") ));

/*! \brief Check whether the LIKWID library was built with AMD GPU support */
extern int likwid_getRocmSupport(void) __attribute__ ((visibility ("default") ));

/*! \brief Get the maximal count of supported HW threads */
extern int likwid_getMaxSupportedThreads(void) __attribute__ ((visibility ("default") ));

Expand Down
9 changes: 9 additions & 0 deletions src/meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ int likwid_getNvidiaSupport(void)
#endif
}

int likwid_getRocmSupport(void)
{
#ifdef LIKWID_WITH_ROCMON
return 1;
#else
return 0;
#endif
}

int likwid_getMaxSupportedThreads(void)
{
return (int) MAX_NUM_THREADS;
Expand Down

0 comments on commit 141a59e

Please sign in to comment.