Skip to content

updates webgpu ep version to be decoupled from foundry local version in cpp core#758

Open
prathikr wants to merge 4 commits into
mainfrom
prathikrao/webgpu-ep-cpp-core
Open

updates webgpu ep version to be decoupled from foundry local version in cpp core#758
prathikr wants to merge 4 commits into
mainfrom
prathikrao/webgpu-ep-cpp-core

Conversation

@prathikr

@prathikr prathikr commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 2, 2026 20:32
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment Jun 9, 2026 8:24pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the C++ WebGPU execution provider (EP) bootstrapper to decouple WebGPU EP package updates from Foundry Local releases by switching from a hard-coded package URL+hashes to a manifest-driven download and verification flow.

Changes:

  • Fetch a platform-specific WebGPU EP package URL + expected SHA-256 hashes from a CDN-hosted JSON manifest.
  • Install via a staging directory + lock file, then promote to the final install directory.
  • Move binary verification to a map-driven VerifyPackage(...) helper.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.h Updates class documentation and adds a VerifyPackage helper signature for manifest-driven verification.
sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc Implements manifest fetching/parsing, staging-based install, and hash verification based on manifest contents.

Comment thread sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc Outdated
Comment thread sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc Outdated
Comment thread sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc Outdated
Comment thread sdk_v2/cpp/src/manager.cc
Comment thread sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.h Outdated
Comment thread sdk_v2/cpp/src/ep_detection/webgpu_ep_bootstrapper.cc
/// @param ep_name EP name used in warning log messages (e.g. "CUDA EP").
/// @param logger Logger for diagnostic output.
/// @return true if every file exists and its hash matches; false otherwise.
inline bool VerifyEpPackage(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be inlined?

Comment thread sdk_v2/cpp/src/manager.cc
// CUDA EP — only if an NVIDIA GPU is detected
if (CudaEpBootstrapper::HasNvidiaGpu()) {
auto cuda_ep_dir = *config_.model_cache_dir + "/cuda-ep";
auto cuda_ep_dir = cache_dir + "/cuda-ep";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since cache_dir is a filesystem path, can we do

const auto cache_dir = std::filesystem::path(*config_.model_cache_dir).parent_path();
const auto cuda_ep_dir = cache_dir / "cuda-ep";

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