This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refine logger * add some comment
- Loading branch information
Showing
8 changed files
with
93 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
#pragma once | ||
#include <string> | ||
#include <vector> | ||
#include "logger/StringRef.h" | ||
|
||
#include "logger/StringRef.h" | ||
|
||
/// @brief replace xpu_set_device or cuda_set_device | ||
void dh_patch_runtime(); | ||
|
||
|
||
/// @brief replace more runtime api to profile api performance and arguments | ||
void __runtimeapi_hook_initialize(); | ||
|
||
void __print_hook_initialize(std::vector<adt::StringRef> &target_libs, std::vector<adt::StringRef> &target_symbols); | ||
/// @brief config which library and which printf like symbols will be replace | ||
/// @param target_libs | ||
/// @param target_symbols | ||
void __print_hook_initialize(const std::vector<adt::StringRef> &target_libs, | ||
const std::vector<adt::StringRef> &target_symbols); | ||
|
||
/// @brief start capture printf output | ||
void __print_hook_start_capture(); | ||
|
||
/// @brief end capture printf output and return all of printf's output | ||
/// @return | ||
std::string __print_hook_end_capture(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters