(draft; work in progress)
See also:
- Compilers
- Program analysis:
- Dynamic analysis - instrumentation, translation, sanitizers
| # This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting. | |
| # https://developer.nvidia.com/nsight-systems | |
| # https://docs.nvidia.com/nsight-systems/profiling/index.html | |
| # My preferred nsys (command line executable used to create profiles) commands | |
| # | |
| # In your script, write | |
| # torch.cuda.nvtx.range_push("region name") | |
| # ... |
(draft; work in progress)
See also:
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
| #!/bin/bash | |
| usage="Usage: $(basename "$0") <name>" | |
| if [ $# -ne 1 ]; then | |
| echo $usage | |
| exit 0 | |
| fi | |
| proj=$1 |
| CC = gcc | |
| CPPFLAGS += -D_GNU_SOURCE | |
| CFLAGS += -O0 -g -Wall -Wextra | |
| SRCS = driver.c module.c | |
| OBJS = $(SRCS:.c=.o) | |
| all: utest | |
| utest: $(OBJS) |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| struct closure { | |
| void (* call)(struct closure *); | |
| int x; | |
| }; |