Skip to content

Commit

Permalink
add the webgpu backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Mar 9, 2024
1 parent 840ccb8 commit 74a98e0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ <h5 class="offcanvas-title" id="offcanvasExampleLabel">Settings</h5>
<input class="form-check-input" type="radio" name="backend" id="webgl" value="webgl">
<label class="form-check-label" for="webgl">GPU</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="backend" id="webgpu" value="webgpu">
<label class="form-check-label" for="webgpu">webGPU</label>
</div>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions js/model.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const tf = require('@tensorflow/tfjs-node');
require('@tensorflow/tfjs-backend-webgpu');
const fs = require('node:fs');
const path = require('node:path');
let DEBUG = false;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
"@fast-csv/format": "^4.3.5",
"@popperjs/core": "^2.9.2",
"@tensorflow/tfjs-core": "4.17.0",
"@tensorflow/tfjs-backend-webgpu": "4.17.0",
"@tensorflow/tfjs-node": "4.17.0",
"bootstrap": "5.2.3",
"browser-id3-writer": "^4.4.0",
Expand Down

0 comments on commit 74a98e0

Please sign in to comment.