NCCL Communication C++ Example (Part 4): Implementation and Analysis of AlltoAll_Split

NCCL Communication C++ Example (Part 4): Implementation and Analysis of AlltoAll_Split

In NCCL cluster communication operations, there is no direct alltoall communication API, nor is there an alltoall_split method. This article mainly introduces the principle of alltoall_split and one implementation method, along with profiling of the send/recv operator calls in the alltoall operation. Other references: NCCL Communication C++ Example (Part 1): Basic Use Case Interpretation and … Read more

Embedded Linux C Language Debugging and Macro Usage Techniques

Embedded Linux C Language Debugging and Macro Usage Techniques

01. Debugging Related Macros When compiling programs in Linux using gcc, there are some special syntaxes for debugging statements. During the compilation process, gcc generates some macros that can be used to print information about the current source file, mainly including the current file, the currently running function, and the current line of the program. … Read more

Understanding Linux Flame Graphs for Performance Analysis

Understanding Linux Flame Graphs for Performance Analysis

A Flame Graph is a tool used for visualizing program performance analysis data, helping developers quickly identify performance bottlenecks in their programs. Flame Graphs present call stack information in a graphical format, making complex call relationships intuitive and easy to understand. 1. Principle The core idea of a Flame Graph is to collect the call … Read more

Summary of Debugging Techniques and Macro Usage in Embedded C Programming

Summary of Debugging Techniques and Macro Usage in Embedded C Programming

1. Debugging Related Macros When compiling programs with gcc on Linux, there are some special syntax rules for debugging statements. During the gcc compilation process, certain macros are generated that can be used to print information about the current source file, including the current file, the currently running function, and the current line of code. … Read more

Embedded Software Debugging: How to Calculate Task Execution Cycles?

Embedded Software Debugging: How to Calculate Task Execution Cycles?

1. DWT Trace Component Trace Component: Data Watchpoint and Trace (DWT) In DWT, there are remaining counters that are typically used for “performance profiling” of program code. By programming them, they can generate events (in the form of trace packets) when the counter overflows.The most typical use is to measure the number of cycles taken … Read more

How to Learn C/C++ for Embedded Development?

How to Learn C/C++ for Embedded Development?

As we all know, embedded development is a “cross-border battlefield” between software and hardware, and C/C++ serves as the main assembly language, requiring a balance between performance and hardware control. If you want to become an embedded engineer, what key points should you focus on learning in these two languages?! Interrupt Latency Optimization: Disable global … Read more

Detecting Memory Issues Using Valgrind

Detecting Memory Issues Using Valgrind

Valgrind is a software development tool for memory debugging, memory leak detection, and performance profiling. 1 Installing Valgrind You can download the latest source package from the official website: Valgrind official download, or directly use the c_utils/debug/valgrind directory provided valgrind-3.13.0.tar.bz2 source package. First, extract the source package tar xjf valgrind-3.13.0.tar.bz2 Enter the extracted directory and … Read more