Skip to content
Snippets Groups Projects
Commit cde293a6 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Merge branch 'add-use-gpu-advanced-settings' into 'master'

Add use_gpu in advanced settings

Closes #792

See merge request !1057
parents 5eeae8ad 7b62c2a6
No related branches found
No related tags found
1 merge request!1057Add use_gpu in advanced settings
......@@ -115,6 +115,16 @@
<input :disabled="!hasWorkerRuns" type="checkbox" v-model="useCache" />
</label>
</div>
<div
class="field"
:title="hasWorkerRuns ? 'Use a GPU for tasks that require one' : 'Using a GPU requires first selecting workers'"
>
<label class="label is-flex">
<span class="tag is-info mr-1">beta</span>
Use a GPU
<input :disabled="!hasWorkerRuns" type="checkbox" v-model="useGPU" />
</label>
</div>
</div>
</div>
<div class="column is-narrow">
......@@ -176,7 +186,8 @@ export default {
advancedSettings: false,
updateLoading: false,
useCache: false,
workerActivity: true
workerActivity: true,
useGPU: false
}),
async mounted () {
await this.getProcess()
......@@ -244,10 +255,9 @@ export default {
const payload = { chunks: this.chunks }
if (this.farmId) payload.farm = this.farmId
if (this.thumbnails) payload.thumbnails = true
if (this.hasWorkerRuns) {
if (this.useCache) payload.use_cache = true
if (this.workerActivity) payload.worker_activity = true
}
if (this.useCache) payload.use_cache = true
if (this.workerActivity) payload.worker_activity = true
if (this.useGPU) payload.use_gpu = true
try {
await this.$store.dispatch('process/startProcess', { processId: this.id, payload })
this.$router.push({ name: 'process-status', params: { id: this.id } })
......@@ -274,6 +284,13 @@ export default {
},
advancedSettings (open) {
if (open && !this.farms) this.listPonosFarms()
},
hasWorkerRuns (workers) {
if (!workers) {
this.useCache = false
this.workerActivity = false
this.useGPU = false
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment