@@ -105,6 +105,12 @@ function getPreferredCuda(os) {
105
105
106
106
// Disable compute platform not supported on OS
107
107
function disableUnsupportedPlatforms ( os ) {
108
+
109
+ if ( opts . ptbuild == "preview" )
110
+ archMap = version_map . nightly
111
+ else
112
+ archMap = version_map . release
113
+
108
114
for ( const [ arch_key , info ] of archInfoMap ) {
109
115
var elems = document . querySelectorAll ( '[id^="' + arch_key + '"]' ) ;
110
116
if ( elems == null ) {
@@ -114,6 +120,11 @@ function disableUnsupportedPlatforms(os) {
114
120
for ( var i = 0 ; i < elems . length ; i ++ ) {
115
121
var supported = info . platforms . has ( os ) ;
116
122
elems [ i ] . style . textDecoration = supported ? "" : "line-through" ;
123
+
124
+ // Officially supported arch but not available
125
+ if ( ! archMap [ elems [ i ] . id ] ) {
126
+ elems [ i ] . style . textDecoration = "line-through" ;
127
+ }
117
128
}
118
129
}
119
130
}
@@ -129,7 +140,12 @@ function changeVersion(ptbuild) {
129
140
for ( const [ arch_key , info ] of archInfoMap ) {
130
141
var elems = document . querySelectorAll ( '[id^="' + arch_key + '"]' ) ;
131
142
for ( var i = 0 ; i < elems . length ; i ++ ) {
132
- elems [ i ] . children [ 0 ] . textContent = info . title + " " + archMap [ elems [ i ] . id ] [ 1 ]
143
+ if ( archMap [ elems [ i ] . id ] ) {
144
+ elems [ i ] . style . textDecoration = "" ;
145
+ elems [ i ] . children [ 0 ] . textContent = info . title + " " + archMap [ elems [ i ] . id ] [ 1 ]
146
+ } else {
147
+ elems [ i ] . style . textDecoration = "line-through" ;
148
+ }
133
149
}
134
150
}
135
151
var stable_element = document . getElementById ( "stable" ) ;
@@ -190,6 +206,8 @@ function selectedOption(option, selection, category) {
190
206
}
191
207
} else if ( category == "ptbuild" ) {
192
208
changeVersion ( opts . ptbuild ) ;
209
+ //make sure unsupported platforms are disabled
210
+ disableUnsupportedPlatforms ( opts . os ) ;
193
211
}
194
212
commandMessage ( buildMatcher ( ) ) ;
195
213
if ( category === "os" ) {
0 commit comments