MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / download_dawn

Function download_dawn

setup.py:55–84  ·  view source on GitHub ↗
(os_name)

Source from the content-addressed store, hash-verified

53 sys.exit(1)
54
55def download_dawn(os_name):
56 print("\nDownload Dawn Library")
57 print("=====================\n")
58
59 outfile_map = {
60 "macOS": "third_party/lib/libdawn.dylib",
61 "Linux": "third_party/lib/libdawn.so",
62 }
63 url_map = {
64 "macOS": "https://github.com/austinvhuang/dawn-artifacts/releases/download/prerelease/libdawn.dylib",
65 "Linux": "https://github.com/austinvhuang/dawn-artifacts/releases/download/prerelease/libdawn.so",
66 }
67
68 outfile = outfile_map.get(os_name)
69 url = url_map.get(os_name)
70
71 if not outfile or not url:
72 print(f"No download information for {os_name}")
73 sys.exit(1)
74
75 print(f" URL : {url}")
76 print(f" Download File : {outfile}\n")
77 print(" Downloading ...\n")
78
79 if Path(outfile).exists():
80 print(f" File {outfile} already exists, skipping.")
81 sys.exit(0)
82
83 Path(outfile).parent.mkdir(parents=True, exist_ok=True)
84 download_file(url, outfile)
85
86def setup_env(os_name):
87 print("\nEnvironment Setup")

Callers 1

mainFunction · 0.85

Calls 1

download_fileFunction · 0.85

Tested by

no test coverage detected