import { g as o, s as e, r as s } from "./index-DSGwv2Yx.js";
async function c(t, a) {
  if (o() !== t) {
    if (t === "webgpu") {
      const { registerWebGPUBackend: i } = await import("./patches/webgpu_base.js");
      i(a), await import("./index-BQvB7LCC.js"), await import("./ops/webgpu/index.js");
    }
    await e(t), await s(), console.log(`Backend set to ${t}`);
  }
}
export {
  c as selectBackend
};
