Giter VIP home page Giter VIP logo

robotics_coding's Introduction

针对Robotics Coding指南

本仓库收集汇总一些个人觉得常用的关于ROS等相关程序debug,profiling,加速调优等的相关工具链.

Debug

CPU程序Debug

关于逐行运行代码debug

推荐vscode ros插件,以debug模式编译节点,之后详见

Core Dump分析

CUDA程序Debug

仅仅set(CMAKE_BUILD_TYPE Debug)不够,注意设置-g -G的flag为host与device的调试信息如下,同时安装vscode插件Nsight Visual Studio Code Edition。支持一个warp为单位逐行bug. thread id注意设置为32的整数倍数

cmake_minimum_required(VERSION 3.10)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CUDA_ARCHITECTURES 52;70;75;86)

project(hellocuda LANGUAGES CXX CUDA)

add_executable(main main.cu)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_options(main PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-G -g>)
endif()
target_include_directories(main PUBLIC ../../include)

HPC(高性能计算)

  • 并行加速库推荐OpenMP,在ros中使用个人觉得方便简单,例如典型cpu-bound的进程中for循环加上适当profiling可加速10倍
  • 墙裂推荐并行编程与优化

Profiling (CPU+GPU)

编译,cmake相关系列

  • 参见Doc/cmake项目管理.pdf
  • 参见Doc/cmakeadvanced.pdf
  • 类似墙裂推荐并行编程与优化cmake相关系列

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.