Skip to content
Snippets Groups Projects
Commit 3253ead4 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Update the way toggle GPU selection

parent 26def2b3
No related branches found
No related tags found
1 merge request!3Add form.js
......@@ -27,9 +27,10 @@ function set_partition_change_handler() {
}
function toggle_gpu_visibility(event) {
const show = /pascal|ampere/.test(event.target.value);
const selector = '#batch_connect_session_context_bc_num_gpus';
toggle_visibilty_of_form_group(selector, show);
const partition = event.target.value;
const gpu_selector = '#batch_connect_session_context_bc_num_gpus';
toggle_visibilty_of_form_group(gpu_selector, table[partition]["max_gpu"] != -1);
}
function toggle_visibilty_of_form_group(form_id, show) {
......
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