Run pre-commit's whitespace related hooks on projects/rocr-runtime (#2130)

* Run pre-commit's whitespace related hooks on projects/rocr-runtime

In order for pre-commit to be useful, everything needs to meet a common
baseline.

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>

* Add missing semicolon which would block compilation on big endian CPUs

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>

---------

Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Этот коммит содержится в:
Mario Limonciello
2025-12-08 07:56:50 -06:00
коммит произвёл GitHub
родитель 3faf36fb25
Коммит bc5d48e76c
60 изменённых файлов: 300 добавлений и 303 удалений
+8 -8
Просмотреть файл
@@ -2,24 +2,24 @@
//
// The University of Illinois/NCSA
// Open Source License (NCSA)
//
//
// Copyright (c) 2014-2020, Advanced Micro Devices, Inc. All rights reserved.
//
//
// Developed by:
//
//
// AMD Research and AMD HSA Software Development
//
//
// Advanced Micro Devices, Inc.
//
//
// www.amd.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal with the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimers.
// - Redistributions in binary form must reproduce the above copyright
@@ -29,7 +29,7 @@
// nor the names of its contributors may be used to endorse or promote
// products derived from this Software without specific prior written
// permission.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+2 -3
Просмотреть файл
@@ -1,7 +1,7 @@
################################################################################
##
## Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
##
## Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
##
## SPDX-License-Identifier: MIT
##
################################################################################
@@ -68,4 +68,3 @@ if len(sys.argv) > 1:
else:
print("Empty arguments!")
+15 -15
Просмотреть файл
@@ -2,24 +2,24 @@
//
// The University of Illinois/NCSA
// Open Source License (NCSA)
//
//
// Copyright (c) 2014-2020, Advanced Micro Devices, Inc. All rights reserved.
//
//
// Developed by:
//
//
// AMD Research and AMD HSA Software Development
//
//
// Advanced Micro Devices, Inc.
//
//
// www.amd.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal with the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimers.
// - Redistributions in binary form must reproduce the above copyright
@@ -29,7 +29,7 @@
// nor the names of its contributors may be used to endorse or promote
// products derived from this Software without specific prior written
// permission.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -63,7 +63,7 @@ ExtensionEntryPoints::ExtensionEntryPoints() {
// Initialize Finalizer function table to be NULLs
void ExtensionEntryPoints::InitFinalizerExtTable() {
// Initialize Version of Api Table
finalizer_api.version.major_id = 0x00;
finalizer_api.version.minor_id = 0x00;
@@ -79,7 +79,7 @@ void ExtensionEntryPoints::InitFinalizerExtTable() {
// Initialize Image function table to be NULLs
void ExtensionEntryPoints::InitImageExtTable() {
// Initialize Version of Api Table
image_api.version.major_id = 0x00;
image_api.version.minor_id = 0x00;
@@ -128,10 +128,10 @@ void ExtensionEntryPoints::InitAmdExtTable() {
// begins hosting Api's from other extension libraries
void ExtensionEntryPoints::UpdateAmdExtTable(decltype(::hsa_amd_image_create)* func_ptr) {
assert(hsa_api_table().amd_ext_api.hsa_amd_image_create_fn ==
(decltype(hsa_amd_image_create)*)hsa_ext_null &&
(decltype(hsa_amd_image_create)*)hsa_ext_null &&
"Duplicate load of extension import.");
assert(hsa_internal_api_table().amd_ext_api.hsa_amd_image_create_fn ==
(decltype(hsa_amd_image_create)*)hsa_ext_null &&
(decltype(hsa_amd_image_create)*)hsa_ext_null &&
"Duplicate load of extension import.");
hsa_api_table().amd_ext_api.hsa_amd_image_create_fn = func_ptr;
hsa_internal_api_table().amd_ext_api.hsa_amd_image_create_fn = func_ptr;
@@ -226,7 +226,7 @@ bool ExtensionEntryPoints::LoadFinalizer(std::string library_name) {
return false;
}
libs_.push_back(lib);
void* ptr;
ptr = os::GetExportAddress(lib, "hsa_ext_program_create_impl");
@@ -281,12 +281,12 @@ bool ExtensionEntryPoints::LoadFinalizer(std::string library_name) {
finalizer_api.hsa_ext_program_finalize_fn =
(decltype(::hsa_ext_program_finalize)*)ptr;
}
// Initialize Version of Api Table
finalizer_api.version.major_id = HSA_FINALIZER_API_TABLE_MAJOR_VERSION;
finalizer_api.version.minor_id = sizeof(::FinalizerExtTable);
finalizer_api.version.step_id = HSA_FINALIZER_API_TABLE_STEP_VERSION;
// Update handle of table of HSA extensions
hsa_internal_api_table().CloneExts(&finalizer_api,
core::HsaApiTable::HSA_EXT_FINALIZER_API_TABLE_ID);
+1 -1
Просмотреть файл
@@ -288,7 +288,7 @@ const IsaRegistry::IsaMap& IsaRegistry::GetSupportedIsas() {
if (supported_isas->size() > 0) {
return *supported_isas;
}
auto parse_out_minor_ver = [&](const std::string& generic_name) -> int32_t {
size_t dot_pos = generic_name.find('.');
int32_t min;
@@ -1,7 +1,7 @@
################################################################################
##
## Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
##
## Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
##
## SPDX-License-Identifier: MIT
##
################################################################################
@@ -68,4 +68,3 @@ if len(sys.argv) > 1:
else:
print("Empty arguments!")
+1 -1
Просмотреть файл
@@ -267,7 +267,7 @@ trap_entry:
// [0x08] out_buf_t* stochastic_trap_buffers;
//
// --- Start profile trap handlers GFX9 --- //
// If the wave entered the trap handler:
// If the wave entered the trap handler:
// If on gfx9:
// - Check SQ_WAVE_PC_HI_HT_SHIFT bit on TTMP1 register to
// identify if it was a host trap.