Skip to content

cuVein/cuThermo init to main repo#2

Open
FlagZhao wants to merge 4 commits intoAccelProf:mainfrom
FlagZhao:cuVein
Open

cuVein/cuThermo init to main repo#2
FlagZhao wants to merge 4 commits intoAccelProf:mainfrom
FlagZhao:cuVein

Conversation

@FlagZhao
Copy link

No description provided.

Copy link
Contributor

@Lin-Mao Lin-Mao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @FlagZhao, can you check these updates and comments?

std::string line;
while (std::getline(fin, line)) {
trim(line);
if (line.empty() || line[0] == '#') continue; // 跳过空行与注释
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (line.empty() || line[0] == '#') continue; // 跳过空行与注释
if (line.empty() || line[0] == '#') continue; // skip empty lines or comments

if (it->second) {
SANITIZER_SAFECALL(sanitizerUnpatchModule(module));
it->second = false;
if (it != sanitizer_active_modules.end()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it won't be sanitizer_active_modules.end() because kernel should be launched on a active module.

it->second = false;
if (it != sanitizer_active_modules.end()) {
if (it->second) {
// SANITIZER_SAFECALL(sanitizerUnpatchModule(module));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// SANITIZER_SAFECALL(sanitizerUnpatchModule(module));
SANITIZER_SAFECALL(sanitizerUnpatchModule(module));

host_tracker_handle->numEntries = 0;
host_tracker_handle->access_buffer = device_access_buffer;

uint32_t num_threads =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU_PATCH_TIME_HOTNESS_CPU doesn't need to use doorBell to check if the kernel is finished.
This is bring error to tool time_hotness_cpu
Line 596-600 can be removed

PRINT("[SANITIZER ERROR] Invalid target block format: %s\n", target_block_str);
exit(EXIT_FAILURE);
}
if (host_tracker_handle->target_block[0] < 0 || host_tracker_handle->target_block[1] < 0 || host_tracker_handle->target_block[2] < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is too long

PRINT("[SANITIZER INFO] Malloc memory %p with size %lu (flag: %u) on device %d\n",
(void*)pModuleData->address, pModuleData->size, pModuleData->flags, device_id);

PRINT("[SANITIZER INFO] Sector tag: %p, end tag: %p\n", (void*)(pModuleData->address >> 5), (void*)((pModuleData->address + pModuleData->size - 1) >> 5));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long

PRINT("[SANITIZER INFO] Context %p creation finished on device %p\n",
&pContextData->context, &pContextData->device);

CUstream p_stream;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems these data are not used, can we remove them?

}
PRINT("[SANITIZER INFO] Alloc host memory %p with size %lu (flag: %u)\n",
(void*)pModuleData->address, pModuleData->size, pModuleData->flags);
PRINT("[SANITIZER INFO] Sector tag: %p, end tag: %p\n", (void*)(pModuleData->address >> 5), (void*)((pModuleData->address + pModuleData->size - 1) >> 5));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long

uint64_t pc;
uint64_t size;
SANITIZER_SAFECALL(sanitizerGetFunctionPcAndSize(pLaunchData->module, pLaunchData->functionName, &pc, &size));
PRINT("[SANITIZER INFO] Launching kernel %s <<<(%u, %u, %u), (%u, %u, %u)>>> on device %d, pc: 0x%lx, size: %lu\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long

uint64_t ctaId;
uint64_t pc;
uint32_t warpId;
uint32_t distinct_sector_count;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
uint32_t distinct_sector_count;
uint32_t distinct_sector_count; // for pc_dependency_analysis tool

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 this pull request may close these issues.

2 participants