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

Fix some misused callings to debug_warning() #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/runtime/amd_gpu_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT:
if (core::Runtime::runtime_singleton_->flag().coop_cu_count() &&
!(core::Runtime::runtime_singleton_->flag().cu_mask(enum_index_).empty())) {
debug_warning("Cooperative launch and CU masking are currently incompatible!");
debug_warning(false && "Cooperative launch and CU masking are currently incompatible!");
*((uint32_t*)value) = 0;
break;
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/runtime/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ hsa_status_t Runtime::Load() {
* This is not a failure, in some environments such as SRIOV, not all CPUID info is
* exposed inside the guest
*/
debug_warning("Parsing CPUID failed.");
debug_warning(false && "Parsing CPUID failed.");
}

flag_.Refresh();
Expand All @@ -1852,7 +1852,7 @@ hsa_status_t Runtime::Load() {
// Setup system clock frequency for the first time.
if (sys_clock_freq_ == 0) {
sys_clock_freq_ = os::SystemClockFrequency();
if (sys_clock_freq_ < 100000) debug_warning("System clock resolution is low.");
if (sys_clock_freq_ < 100000) debug_warning(false && "System clock resolution is low.");
}

BindErrorHandlers();
Expand Down Expand Up @@ -2049,7 +2049,7 @@ void Runtime::CheckVirtualMemApiSupport() {
fn_amdgpu_device_get_fd =
(int (*)(HsaAMDGPUDeviceHandle device_handle))dlsym(RTLD_DEFAULT, "amdgpu_device_get_fd");
if ((error = dlerror()) != NULL) {
debug_warning("amdgpu_device_get_fd not available. Please update version of libdrm");
debug_warning(false && "amdgpu_device_get_fd not available. Please update version of libdrm");
fn_amdgpu_device_get_fd = &fn_amdgpu_device_get_fd_nosupport;
} else {
virtual_mem_api_supported_ = true;
Expand All @@ -2074,7 +2074,7 @@ void Runtime::InitIPCDmaBufSupport() {
fn_amdgpu_device_get_fd =
(int (*)(HsaAMDGPUDeviceHandle device_handle))dlsym(RTLD_DEFAULT, "amdgpu_device_get_fd");
if ((error = dlerror()) != NULL) {
debug_warning("amdgpu_device_get_fd not available. Please update version of libdrm");
debug_warning(false && "amdgpu_device_get_fd not available. Please update version of libdrm");
fn_amdgpu_device_get_fd = &fn_amdgpu_device_get_fd_nosupport;
} else {
ipc_dmabuf_supported_ = !flag().enable_ipc_mode_legacy();
Expand Down