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
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
codespell lint ebpf-profiler format format-ebpf format-go pprof-execs \
pprof_1_23 pprof_1_24 pprof_1_24_cgo otelcol-ebpf-profiler \
rust-components rust-targets rust-tests vanity-import-check vanity-import-fix \
otel-from-tree otel-from-lib
otel-from-tree otel-from-lib cudaverify-test

SHELL := /usr/bin/env bash

Expand Down Expand Up @@ -191,5 +191,20 @@ agent:
legal:
go tool $(GO_TOOLS) go-licenses save --force . --save_path=LICENSES

cudaverify-test: ebpf
@set -e; \
tmpdir=$$(mktemp -d); \
trap 'rm -rf "$$tmpdir"' EXIT; \
cupti_headers=$$(go mod download -json github.com/parca-dev/parcagpu@latest 2>/dev/null | \
sed -n 's/.*"Dir": "\(.*\)".*/\1/p')/ebpf; \
echo "==> Downloading parcagpu libs into $$tmpdir"; \
PARCAGPU_DIR="$$tmpdir" $(CURDIR)/test/distro-qemu/download-parcagpu.sh; \
echo "==> Building cudaverify.test (cupti headers: $$cupti_headers)"; \
CGO_ENABLED=1 CGO_CFLAGS="-I$$cupti_headers" \
go test -c -o "$$tmpdir/cudaverify.test" ./test/cudaverify; \
echo "==> Running cudaverify tests (sudo)"; \
cd "$$tmpdir" && sudo env LD_LIBRARY_PATH="$$tmpdir" \
./cudaverify.test -test.v -so-path ./libparcagpucupti.so

codespell:
@codespell
3 changes: 2 additions & 1 deletion test/distro-qemu/mock-cupti-headers/cupti_pcsampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ typedef struct {
uint32_t functionIndex;
char *functionName;
uint32_t stallReasonCount;
CUpti_PCSamplingStallReason stallReason[CUPTI_PC_SAMPLING_MAX_STALL_REASONS];
CUpti_PCSamplingStallReason *stallReason;
uint32_t correlationId;
} CUpti_PCSamplingPCData;

typedef struct {
Expand Down
Loading