mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
tools: fail fast when NV_RS_RM_OBJECT names a missing path
This commit is contained in:
@ -29,10 +29,10 @@ def require(cond: bool, msg: str) -> None:
|
||||
def discover_rm_object(explicit: str | None = None) -> Path:
|
||||
if explicit:
|
||||
return Path(explicit).expanduser().resolve()
|
||||
candidates: list[Path] = []
|
||||
env_obj = os.environ.get("NV_RS_RM_OBJECT")
|
||||
if env_obj:
|
||||
candidates.append(Path(env_obj).expanduser())
|
||||
return Path(env_obj).expanduser().resolve()
|
||||
candidates: list[Path] = []
|
||||
env_kernel = os.environ.get("NV_RS_KERNEL_SRC")
|
||||
if env_kernel:
|
||||
candidates.append(Path(env_kernel).expanduser() / "nvidia/nv-kernel.o_binary")
|
||||
|
||||
Reference in New Issue
Block a user