Skip to content

Conversation

@EduardDurech
Copy link
Contributor

Worth noting setup.py can be simplified by using CUDA symlinks

7d6
< import subprocess
29,39d27
< def _get_platform_architecture():
<     host_arch = platform.machine()
<     if host_arch == "aarch64":
<         try:
<             uname_output = subprocess.check_output(["uname", "-a"], encoding="utf-8")
<             if "tegra" in uname_output:
<                 return f"{"tegra"}-{host_arch}"
<         except Exception as e:
<             print(f"[warn] Failed to run uname: {e}")
<     return host_arch
<
41,50d28
< arch = platform.machine()
< SYSTEM_ARCH_TYPE = os.environ.get("SYSTEM_ARCH", _get_platform_architecture())
<
< if arch == 'aarch64':
<     if SYSTEM_ARCH_TYPE == "tegra-aarch64":
<         target_dir = 'targets/aarch64-linux'
<     else:
<         target_dir = 'targets/sbsa-linux'
< else:
<     target_dir = 'targets/x86_64-linux'
53c31
<     str(cuda_home.resolve() / target_dir / 'include'),
---
>     str((cuda_home / 'include').resolve()),
57,58c35,36
<     str(cuda_home.resolve() / 'lib64'),
<     str(cuda_home.resolve() / 'lib64/stubs'),
---
>     str((cuda_home / 'lib64').resolve()),
>     str((cuda_home / 'lib64/stubs').resolve()),

@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 8, 2025

Hi, could you please put the diff into the PR? Thanks

@EduardDurech
Copy link
Contributor Author

Hi, could you please put the diff into the PR? Thanks

done, this also can replace #7

@EduardDurech EduardDurech mentioned this pull request Jun 8, 2025
@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 9, 2025

cc @johnnynunez who adds that code - could you please check whether the new code still works on your hardware? (I do not have those so cannot check)

@johnnynunez
Copy link
Contributor

cc @johnnynunez who adds that code - could you please check whether the new code still works on your hardware? (I do not have those so cannot check)

i will check

@johnnynunez
Copy link
Contributor

@fzyzcjy it is working in both devices

@fzyzcjy fzyzcjy merged commit b88268b into fzyzcjy:master Jun 10, 2025
@fzyzcjy
Copy link
Owner

fzyzcjy commented Jun 10, 2025

Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants