You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected: Use FetchContent_Delcare to declare the dependency and then use FetchContent_MakeAvailable and the built library and headers will be in the _deps/gpucpp-{build/subbuild/src}
Actual: The generating process ends up with an error. Error message and minimal reproducible CMakeLists.txt is inside the gist
The dawn library file doesn't appear in the third_party/lib directory. After I built this and put the libdawn.dylib into the third_party/lib directory the cmake command works.
tagging @MichealReed as well - it's been a minute since i've played with cmake builds. From a quick look I think we need to include dawn either/both transitive fetchcontent dependence or make use of the prebuilt binaries:
incorporate functionality to download the prebuilt dylib similarly to the makefile + setup.py script
transitive shared library with fetchcontent. + jspanchu repo
can take a closer look over the weekend. would probably good if we have a separate template starter repo in the future if anyone's interesting in taking a stab at that.
tagging @MichealReed as well - it's been a minute since i've played with cmake builds. From a quick look I think we need to include dawn either/both transitive fetchcontent dependence or make use of the prebuilt binaries:
incorporate functionality to download the prebuilt dylib similarly to the makefile + setup.py script
transitive shared library with fetchcontent. + jspanchu repo
can take a closer look over the weekend. would probably good if we have a separate template starter repo in the future if anyone's interesting in taking a stab at that.
Downloading prebuilt library can be done in FetchContent since it accepts url.
If you're up for taking a first stab at it, happy to review+merge a PR. Can check the dawnlib target of the top-level Makefile and the setup.py script for the logic (could either call out to setup.py or replicate the setup.py logic in CMakeLists, whatever's cleaner).
tagging @MichealReed as well - it's been a minute since i've played with cmake builds. From a quick look I think we need to include dawn either/both transitive fetchcontent dependence or make use of the prebuilt binaries:
* incorporate functionality to download the prebuilt dylib similarly to the makefile + setup.py script
* transitive via fetchcontent like https://github.com/AnswerDotAI/gpu.cpp/blob/main/examples/webgpu_from_scratch/CMakeLists.txt
* transitive shared library with fetchcontent. + jspanchu repo
can take a closer look over the weekend. would probably good if we have a separate template starter repo in the future if anyone's interesting in taking a stab at that.
Yes this makes sense, our makefile was the component that downloaded the libs before calling cmake. Nothing is in CMake currently to download libs and the python script must be ran first. Adding it via fetch seems like a good addition 👍
Activity
austinvhuang commentedon Aug 9, 2024
tagging @MichealReed as well - it's been a minute since i've played with cmake builds. From a quick look I think we need to include dawn either/both transitive fetchcontent dependence or make use of the prebuilt binaries:
can take a closer look over the weekend. would probably good if we have a separate template starter repo in the future if anyone's interesting in taking a stab at that.
kagurazaka-ayano commentedon Aug 9, 2024
Downloading prebuilt library can be done in FetchContent since it accepts url.
austinvhuang commentedon Aug 9, 2024
If you're up for taking a first stab at it, happy to review+merge a PR. Can check the
dawnlibtarget of the top-levelMakefileand thesetup.pyscript for the logic (could either call out tosetup.pyor replicate thesetup.pylogic in CMakeLists, whatever's cleaner).MichealReed commentedon Aug 9, 2024
Yes this makes sense, our makefile was the component that downloaded the libs before calling cmake. Nothing is in CMake currently to download libs and the python script must be ran first. Adding it via fetch seems like a good addition 👍
MichealReed commentedon Aug 15, 2024
This looks like it's working great but my install step fails with
I'm not sure I've seen a webgpu_dawn.dll so not sure why it's looking for that as a part of this install.
kagurazaka-ayano commentedon Aug 15, 2024
seems like the problem with windows build. Unfortunately I don't have a windows device so I might not be able to test this.
Or is it because find_library works in a different way on windows?
kagurazaka-ayano commentedon Jan 23, 2025
closing since pr has been merged
kagurazaka-ayano commentedon Sep 15, 2025
Reopening since there is a breaking change on WebGPU-distribution side (they removed branch dawn).
In cmake/webgpu.cmake:
I think this is the place where the webgpu is cloned.