generated from SylvanBrocard/dpu_trees
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4cbb7e
commit 1694245
Showing
9 changed files
with
184 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Checks: > | ||
*, | ||
-llvmlibc*, | ||
-fuchsia*, | ||
-altera*, | ||
-android*, | ||
CheckOptions: | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.ClassMemberCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ConstexprVariableCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.ConstexprVariablePrefix | ||
value: k | ||
- key: readability-identifier-naming.EnumCase | ||
value: lower_case | ||
- key: readability-identifier-naming.EnumPrefix | ||
value: _ | ||
- key: readability-identifier-naming.EnumConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.EnumConstantPrefix | ||
value: '' | ||
- key: readability-identifier-naming.FunctionCase | ||
value: lower_case | ||
- key: readability-identifier-naming.GlobalConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.StaticConstantCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.StaticConstantPrefix | ||
value: k | ||
- key: readability-identifier-naming.StaticVariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.MacroDefinitionCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.MacroDefinitionIgnoredRegexp | ||
value: "(^[A-Z]+(_[A-Z]+)*_$|^_.*)" | ||
- key: readability-identifier-naming.MemberCase | ||
value: lower_case | ||
- key: readability-identifier-naming.PrivateMemberSuffix | ||
value: _ | ||
- key: readability-identifier-naming.PublicMemberSuffix | ||
value: "" | ||
- key: readability-identifier-naming.NamespaceCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ParameterCase | ||
value: lower_case | ||
- key: readability-identifier-naming.TypeAliasCase | ||
value: camelBack | ||
- key: readability-identifier-naming.TypedefCase | ||
value: lower_case | ||
- key: readability-identifier-naming.TypeDefSuffix | ||
value: _t | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.IgnoreMainLikeFunctions | ||
value: 1 | ||
- key: readability-identifier-naming.MethodCase | ||
value: camelBack | ||
- key: readability-identifier-naming.StructCase | ||
value: lower_case |
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,16 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/ubuntu/.devcontainer/base.Dockerfile | ||
# See here for image contents: https://github.com/devcontainers/images/tree/main/src/base-ubuntu | ||
|
||
# [Choice] Ubuntu version: hirsute, bionic, focal | ||
ARG VARIANT="focal" | ||
ARG VARIANT="jammy" | ||
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} | ||
|
||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> | ||
|
||
RUN sudo apt update \ | ||
&& sudo apt -y install python-is-python3 pip build-essential cmake ninja-build cppcheck \ | ||
&& sudo apt full-upgrade -y | ||
RUN sudo apt update \ | ||
&& wget http://sdk-releases.upmem.com/2021.3.0/ubuntu_20.04/upmem_2021.3.0_amd64.deb \ | ||
&& sudo apt install -y ./upmem_2021.3.0_amd64.deb | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install build-essential ninja-build cppcheck nox pre-commit\ | ||
&& apt-get dist-upgrade -y | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& wget http://sdk-releases.upmem.com/2024.2.0/ubuntu_22.04/upmem_2024.2.0_amd64.deb \ | ||
&& apt-get install -y ./upmem_2024.2.0_amd64.deb \ | ||
&& rm upmem_2024.2.0_amd64.deb |
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# | ||
# Copyright (c) 2014-2024 - UPMEM | ||
# | ||
|
||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(CMAKE_SYSTEM_PROCESSOR dpu) | ||
|
||
if(NOT DEFINED UPMEM_HOME) | ||
if("$ENV{UPMEM_HOME}" STREQUAL "") | ||
set(UPMEM_HOME "/usr") | ||
else() | ||
set(UPMEM_HOME $ENV{UPMEM_HOME}) | ||
endif() | ||
endif() | ||
|
||
set(CMAKE_SYSROOT ${UPMEM_HOME}/share/upmem/include) | ||
|
||
set(tools ${UPMEM_HOME}/bin) | ||
|
||
set(triple dpu-upmem-dpurte) | ||
|
||
set(CMAKE_C_COMPILER ${tools}/clang) | ||
set(CMAKE_C_COMPILER_TARGET ${triple}) | ||
set(CMAKE_CXX_COMPILER ${tools}/clang++) | ||
set(CMAKE_CXX_COMPILER_TARGET ${triple}) | ||
set(CMAKE_ASM_COMPILER ${tools}/clang) | ||
set(CMAKE_ASM_COMPILER_TARGET ${triple}) | ||
|
||
# temporary workaround until SDK distributes llvm-ranlib | ||
set(CMAKE_C_COMPILER_RANLIB echo) | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) | ||
|
||
set(CMAKE_C_COMPILER_FORCED 1) | ||
|
||
set(CHIP_VERSION "v1A") # Default value | ||
if(EXISTS "/sys/class/dpu_rank/dpu_rank0/dpu_chip_id") | ||
file(READ "/sys/class/dpu_rank/dpu_rank0/dpu_chip_id" CHIP_ID_NUMBER) | ||
if(CHIP_ID_NUMBER GREATER 8) | ||
set(CHIP_VERSION "v1B") | ||
endif() | ||
endif() | ||
|
||
set(CMAKE_C_FLAGS_INIT "-mcpu=${CHIP_VERSION} -g") |
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