jetson compile fix
This commit is contained in:
@@ -18,15 +18,23 @@ GPR_CPP_DIR ?= $(HOME)/Documents/VNA_AlGo/gpr_cpp
|
||||
GPR_CPP_LIB ?= $(GPR_CPP_DIR)/build/libgpr_core_cpp.a
|
||||
GPR_VENV ?= $(GPR_CPP_DIR)/../.venv
|
||||
GPR_CUDA_INC_DIR ?= $(dir $(firstword $(wildcard $(GPR_VENV)/lib/python*/site-packages/nvidia/*/include/nvrtc.h)))
|
||||
# cuda.h can live in a DIFFERENT pip package than nvrtc.h (Jetson: cuda_runtime
|
||||
# vs cuda_nvrtc); the unified cu13 package on dev machines has both in one dir.
|
||||
GPR_CUDA_RT_INC_DIR ?= $(dir $(firstword $(wildcard $(GPR_VENV)/lib/python*/site-packages/nvidia/*/include/cuda.h)))
|
||||
GPR_NVRTC_LIB ?= $(firstword $(wildcard $(GPR_VENV)/lib/python*/site-packages/nvidia/*/lib/libnvrtc.so*))
|
||||
# System-CUDA fallback. An empty GPR_CUDA_INC_DIR would also corrupt the compile
|
||||
# command: a bare `-I` swallows the next argument.
|
||||
ifeq ($(strip $(GPR_CUDA_INC_DIR)),)
|
||||
GPR_CUDA_INC_DIR := /usr/local/cuda/include
|
||||
endif
|
||||
ifeq ($(strip $(GPR_CUDA_RT_INC_DIR)),)
|
||||
GPR_CUDA_RT_INC_DIR := /usr/local/cuda/include
|
||||
endif
|
||||
ifeq ($(strip $(GPR_NVRTC_LIB)),)
|
||||
GPR_NVRTC_LIB := $(firstword $(wildcard /usr/local/cuda/lib64/libnvrtc.so*))
|
||||
endif
|
||||
# Deduplicated CUDA include flags (a single dir on dev machines).
|
||||
GPR_CUDA_INC_FLAGS := $(addprefix -I,$(sort $(GPR_CUDA_INC_DIR) $(GPR_CUDA_RT_INC_DIR)))
|
||||
GPR_CUDA_LIB_DIR := $(dir $(GPR_NVRTC_LIB))
|
||||
# libnvrtc from pip ships only as libnvrtc.so.N (no .so symlink), so link the
|
||||
# full path; the rpath makes the binary find it without LD_LIBRARY_PATH.
|
||||
@@ -34,7 +42,7 @@ DATA_PROCESSOR_LDFLAGS := $(LDFLAGS) $(GPR_CPP_LIB) $(GPR_NVRTC_LIB) -lcuda -Wl,
|
||||
|
||||
INCLUDES := \
|
||||
-I$(GPR_CPP_DIR)/include \
|
||||
-I$(GPR_CUDA_INC_DIR) \
|
||||
$(GPR_CUDA_INC_FLAGS) \
|
||||
-Idata_acq_and_processing/common_cpp/ipc/include \
|
||||
-Idata_acq_and_processing/common_cpp/config/include \
|
||||
-Idata_acq_and_processing/third_party \
|
||||
|
||||
@@ -164,7 +164,11 @@ def main() -> int:
|
||||
rate_scale = float(replay.rate_scale) if replay.rate_scale > 0 else 1.0
|
||||
combos = [ComboKey(input=combo.input, output=combo.output) for combo in config.combos]
|
||||
|
||||
dataset = _load_dataset(Path(replay.dataset_dir), combos, int(config.radar.sweep.points))
|
||||
# expanduser: profiles are copied between machines, so "~/..." dataset paths
|
||||
# must resolve against the local home instead of failing as a literal "~".
|
||||
dataset = _load_dataset(
|
||||
Path(replay.dataset_dir).expanduser(), combos, int(config.radar.sweep.points)
|
||||
)
|
||||
logger.info(
|
||||
"Replay producer starting: dataset=%s, snapshots=%d, combos=%d, "
|
||||
"median_gap=%.3f s, loop=%s, rate_scale=%.2f",
|
||||
|
||||
@@ -140,7 +140,8 @@ def main() -> int:
|
||||
|
||||
config = RunConfigModel.load_from_path(args.config)
|
||||
config.ensure_combos()
|
||||
dataset_dir = Path(config.radar.replay.dataset_dir)
|
||||
# expanduser: "~/..." dataset paths from machine-portable profiles.
|
||||
dataset_dir = Path(config.radar.replay.dataset_dir).expanduser()
|
||||
if not dataset_dir.is_dir():
|
||||
raise RuntimeError(f"Replay dataset not found: {dataset_dir}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user