Skip to content
Merged
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
33 changes: 0 additions & 33 deletions src/a2a3/platform/include/aicore/aicore.h

This file was deleted.

53 changes: 0 additions & 53 deletions src/a2a3/platform/include/aicpu/device_malloc.h

This file was deleted.

6 changes: 5 additions & 1 deletion src/a2a3/platform/onboard/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ list(APPEND HOST_RUNTIME_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/device_runner.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/memory_allocator.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/pto_runtime_c_api.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../common/platform/src/host/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/host_regs.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/l2_swimlane_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/tensor_dump_collector.cpp"
Expand Down Expand Up @@ -106,6 +106,10 @@ target_compile_options(host_runtime
-g
)

# Platform name baked into the shared get_platform() impl in
# src/common/platform/src/host/platform_compile_info.cpp.
target_compile_definitions(host_runtime PRIVATE SIMPLER_PLATFORM_NAME="a2a3")

if(SIMPLER_ENABLE_PTO_SDMA_WORKSPACE)
target_compile_definitions(host_runtime PRIVATE SIMPLER_ENABLE_PTO_SDMA_WORKSPACE=1)
endif()
Expand Down
13 changes: 0 additions & 13 deletions src/a2a3/platform/onboard/host/platform_compile_info.cpp

This file was deleted.

6 changes: 5 additions & 1 deletion src/a2a3/platform/sim/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ set(HOST_RUNTIME_SOURCES "")
list(APPEND HOST_RUNTIME_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/device_runner.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/pto_runtime_c_api.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../common/platform/src/host/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/l2_swimlane_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/tensor_dump_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/pmu_collector.cpp"
Expand Down Expand Up @@ -90,6 +90,10 @@ target_compile_options(host_runtime
$<$<CXX_COMPILER_ID:GNU>:-fno-gnu-unique>
)

# Platform name baked into the shared get_platform() impl in
# src/common/platform/src/host/platform_compile_info.cpp.
target_compile_definitions(host_runtime PRIVATE SIMPLER_PLATFORM_NAME="a2a3sim")

# Include directories
target_include_directories(host_runtime
PRIVATE
Expand Down
13 changes: 0 additions & 13 deletions src/a2a3/platform/sim/host/platform_compile_info.cpp

This file was deleted.

33 changes: 0 additions & 33 deletions src/a5/platform/include/aicore/aicore.h

This file was deleted.

109 changes: 0 additions & 109 deletions src/a5/platform/include/host/memory_allocator.h

This file was deleted.

6 changes: 5 additions & 1 deletion src/a5/platform/onboard/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ list(APPEND HOST_RUNTIME_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/memory_allocator.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/profiling_copy.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/pto_runtime_c_api.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../common/platform/src/host/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/host_regs.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/l2_swimlane_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/pmu_collector.cpp"
Expand Down Expand Up @@ -91,6 +91,10 @@ target_compile_options(host_runtime
-g
)

# Platform name baked into the shared get_platform() impl in
# src/common/platform/src/host/platform_compile_info.cpp.
target_compile_definitions(host_runtime PRIVATE SIMPLER_PLATFORM_NAME="a5")

# Include directories - always include local headers
target_include_directories(host_runtime
PRIVATE
Expand Down
13 changes: 0 additions & 13 deletions src/a5/platform/onboard/host/platform_compile_info.cpp

This file was deleted.

6 changes: 5 additions & 1 deletion src/a5/platform/sim/host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ list(APPEND HOST_RUNTIME_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/device_runner.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/profiling_copy.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/pto_runtime_c_api.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../common/platform/src/host/platform_compile_info.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/l2_swimlane_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/pmu_collector.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/host/scope_stats_collector.cpp"
Expand Down Expand Up @@ -91,6 +91,10 @@ target_compile_options(host_runtime
$<$<CXX_COMPILER_ID:GNU>:-fno-gnu-unique>
)

# Platform name baked into the shared get_platform() impl in
# src/common/platform/src/host/platform_compile_info.cpp.
target_compile_definitions(host_runtime PRIVATE SIMPLER_PLATFORM_NAME="a5sim")

# Include directories
target_include_directories(host_runtime
PRIVATE
Expand Down
43 changes: 43 additions & 0 deletions src/common/platform/include/aicore/aicore.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) PyPTO Contributors.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
* -----------------------------------------------------------------------------------------------------------
*/
/**
* @file aicore.h
* @brief AICore Platform Abstraction Layer
*
* Provides unified AICore qualifiers and macros for both real hardware
* and simulation environments. Uses conditional compilation to select
* the appropriate implementation.
*
* Platform Support (same shape for both arches):
* - onboard: Real Ascend hardware with CANN compiler
* - sim: Host-based simulation using standard C++
*/

#ifndef SRC_COMMON_PLATFORM_INCLUDE_AICORE_AICORE_H_
#define SRC_COMMON_PLATFORM_INCLUDE_AICORE_AICORE_H_

// =============================================================================
// Common Memory Qualifiers (All Platforms)
// =============================================================================

#include "common/qualifier.h"

// =============================================================================
// Platform-Specific Definitions
// =============================================================================
// Platform-specific macros (__aicore__, dcci) are defined in inner_kernel.h.
// The build system selects the correct implementation based on platform:
// src/{a2a3,a5}/platform/onboard/aicore/inner_kernel.h (real hardware)
// src/{a2a3,a5}/platform/sim/aicore/inner_kernel.h (simulation)

#include "inner_kernel.h"

#endif // SRC_COMMON_PLATFORM_INCLUDE_AICORE_AICORE_H_
Loading