Fixing rocprofilerv2 naming and CMake issues
Change-Id: Ib6d336349a056731e5c0f35151296d6fea671360
[ROCm/rocprofiler commit: dc69331379]
这个提交包含在:
@@ -48,10 +48,10 @@ This code sample demonstrates how to use the APIs to collect counters and metric
|
||||
|
||||
|
||||
## How to compile
|
||||
In order to get the samples to compile, make sure to copy rocmtools binaries into /opt/rocm/lib
|
||||
Running 'make install' inside the rocmtools/build folder will copy the binaries to /opt/rocm/lib
|
||||
In order to get the samples to compile, make sure to copy rocprofiler binaries into /opt/rocm/lib
|
||||
Running 'make install' inside the rocprofiler/build folder will copy the binaries to /opt/rocm/lib
|
||||
|
||||
Alternately, change the 'ROCMTOOLS_LIBS_PATH' variable in the Makefile to point to the rocmtools/build folder.
|
||||
Alternately, change the 'ROCPROFILER_LIBS_PATH' variable in the Makefile to point to the rocprofiler/build folder.
|
||||
After modifications to Makefile are done, run:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
// Macro to check ROCPROFILER calls status
|
||||
#define CHECK_ROCPROFILER(call) \
|
||||
do { \
|
||||
if ((call) != ROCPROFILER_STATUS_SUCCESS) rocmtools::fatal("Error: ROCMTools API Call Error!"); \
|
||||
if ((call) != ROCPROFILER_STATUS_SUCCESS) rocmtools::fatal("Error: ROCProfiler API Call Error!"); \
|
||||
} while (false)
|
||||
|
||||
// Device (Kernel) functions, it must be void
|
||||
|
||||
@@ -84,7 +84,7 @@ std::string string_printf(const char* format, ...) {
|
||||
message += info.sstream.str();
|
||||
#endif /* defined (ENABLE_BACKTRACE) */
|
||||
|
||||
std::string errmsg("ROCMTools: fatal error: " + message);
|
||||
std::string errmsg("ROCProfiler: fatal error: " + message);
|
||||
fputs(errmsg.c_str(), stderr);
|
||||
|
||||
throw(errmsg);
|
||||
|
||||
@@ -95,7 +95,7 @@ by one or more payloads:
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* ROCMtool General Record base header to identify the id and kind of every
|
||||
* ROCProfiler General Record base header to identify the id and kind of every
|
||||
* record
|
||||
*/
|
||||
rocprofiler_record_header_t header;
|
||||
|
||||
@@ -228,7 +228,7 @@ run_kernel(program_options const &opts)
|
||||
rocprofiler_create_session(ROCPROFILER_NONE_REPLAY_MODE, &sid),
|
||||
rocprofiler_ok);
|
||||
if (ROCPROFILER_STATUS_SUCCESS != rocprofiler_ok) {
|
||||
fputs("error: failed to create rocmtools session\n", stderr);
|
||||
fputs("error: failed to create rocprofiler session\n", stderr);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#define ROCPROFILER_ERROR(code) \
|
||||
do { \
|
||||
fprintf(stderr, \
|
||||
PROGNAME ": Assertion failed at %s:%d, ROCmtools error: %s\n", \
|
||||
PROGNAME ": Assertion failed at %s:%d, ROCProfiler error: %s\n", \
|
||||
__FILE__, __LINE__, rocprofiler_error_str(code)); \
|
||||
fflush(stderr); \
|
||||
} while (false);
|
||||
|
||||
在新工单中引用
屏蔽一个用户