@@ -9,7 +9,7 @@ var opts = {
9
9
cuda : 'cuda9.0' ,
10
10
os : getAnchorSelectedOS ( ) || getDefaultSelectedOS ( ) ,
11
11
pm : 'conda' ,
12
- python : 'python3.6' ,
12
+ language : 'python3.6' ,
13
13
ptbuild : 'stable' ,
14
14
} ;
15
15
@@ -21,7 +21,7 @@ var supportedCloudPlatforms = [
21
21
22
22
var os = $ ( ".os > .option" ) ;
23
23
var package = $ ( ".package > .option" ) ;
24
- var python = $ ( ".python > .option" ) ;
24
+ var language = $ ( ".language > .option" ) ;
25
25
var cuda = $ ( ".cuda > .option" ) ;
26
26
var ptbuild = $ ( ".ptbuild > .option" ) ;
27
27
@@ -31,8 +31,8 @@ os.on("click", function() {
31
31
package . on ( "click" , function ( ) {
32
32
selectedOption ( package , this , "pm" ) ;
33
33
} ) ;
34
- python . on ( "click" , function ( ) {
35
- selectedOption ( python , this , "python " ) ;
34
+ language . on ( "click" , function ( ) {
35
+ selectedOption ( language , this , "language " ) ;
36
36
} ) ;
37
37
cuda . on ( "click" , function ( ) {
38
38
selectedOption ( cuda , this , "cuda" ) ;
@@ -43,7 +43,7 @@ ptbuild.on("click", function() {
43
43
44
44
// Force a selection onclick to get the right operating system selected from
45
45
// the start
46
- $ ( document ) . ready ( function ( ) {
46
+ $ ( document ) . ready ( function ( ) {
47
47
document . getElementById ( opts . os ) . click ( ) ;
48
48
} ) ;
49
49
@@ -82,6 +82,45 @@ function selectedOption(option, selection, category) {
82
82
$ ( option ) . removeClass ( "selected" ) ;
83
83
$ ( selection ) . addClass ( "selected" ) ;
84
84
opts [ category ] = selection . id ;
85
+ if ( category === "pm" ) {
86
+ var elements = document . getElementsByClassName ( "language" ) [ 0 ] . children ;
87
+ if ( selection . id !== "libtorch" && elements [ "cplusplus" ] . classList . contains ( "selected" ) ) {
88
+ $ ( elements [ "cplusplus" ] ) . removeClass ( "selected" ) ;
89
+ $ ( elements [ "python3.7" ] ) . addClass ( "selected" ) ;
90
+ opts [ "language" ] = "python3.7" ;
91
+ } else if ( selection . id == "libtorch" ) {
92
+ for ( var i = 0 ; i < elements . length ; i ++ ) {
93
+ if ( elements [ i ] . id === "cplusplus" ) {
94
+ $ ( elements [ i ] ) . addClass ( "selected" ) ;
95
+ opts [ "language" ] = "cplusplus" ;
96
+ } else {
97
+ $ ( elements [ i ] ) . removeClass ( "selected" ) ;
98
+ }
99
+ $ ( document . getElementsByClassName ( "ptbuild" ) [ 0 ] . children [ "stable" ] ) . removeClass ( "selected" ) ;
100
+ $ ( document . getElementsByClassName ( "ptbuild" ) [ 0 ] . children [ "preview" ] ) . addClass ( "selected" ) ;
101
+ opts [ "ptbuild" ] = "preview" ;
102
+ }
103
+ }
104
+ } else if ( category === "language" ) {
105
+ var elements = document . getElementsByClassName ( "package" ) [ 0 ] . children ;
106
+ if ( selection . id !== "cplusplus" && elements [ "libtorch" ] . classList . contains ( "selected" ) ) {
107
+ $ ( elements [ "libtorch" ] ) . removeClass ( "selected" ) ;
108
+ $ ( elements [ "pip" ] ) . addClass ( "selected" ) ;
109
+ opts [ "pm" ] = "pip" ;
110
+ } else if ( selection . id == "cplusplus" ) {
111
+ for ( var i = 0 ; i < elements . length ; i ++ ) {
112
+ if ( elements [ i ] . id === "libtorch" ) {
113
+ $ ( elements [ i ] ) . addClass ( "selected" ) ;
114
+ opts [ "pm" ] = "libtorch" ;
115
+ } else {
116
+ $ ( elements [ i ] ) . removeClass ( "selected" ) ;
117
+ }
118
+ $ ( document . getElementsByClassName ( "ptbuild" ) [ 0 ] . children [ "stable" ] ) . removeClass ( "selected" ) ;
119
+ $ ( document . getElementsByClassName ( "ptbuild" ) [ 0 ] . children [ "preview" ] ) . addClass ( "selected" ) ;
120
+ opts [ "ptbuild" ] = "preview" ;
121
+ }
122
+ }
123
+ }
85
124
commandMessage ( buildMatcher ( ) ) ;
86
125
if ( category === "os" ) {
87
126
display ( opts . os , 'installation' , 'os' ) ;
@@ -114,7 +153,7 @@ function buildMatcher() {
114
153
"," +
115
154
opts . cuda . toLowerCase ( ) +
116
155
"," +
117
- opts . python . toLowerCase ( )
156
+ opts . language . toLowerCase ( )
118
157
) ;
119
158
}
120
159
@@ -418,6 +457,42 @@ function commandMessage(key) {
418
457
"stable,pip,windows,cuda9.2,python3.7" :
419
458
"pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp37-cp37m-win_amd64.whl<br/>pip3 install torchvision" ,
420
459
460
+ "stable,libtorch,linux,cudanone,cplusplus" :
461
+ "# Currently only available as a Preview." ,
462
+
463
+ "stable,libtorch,linux,cuda8,cplusplus" :
464
+ "# Currently only available as a Preview." ,
465
+
466
+ "stable,libtorch,linux,cuda9.0,cplusplus" :
467
+ "# Currently only available as a Preview." ,
468
+
469
+ "stable,libtorch,linux,cuda9.2,cplusplus" :
470
+ "# Currently only available as a Preview." ,
471
+
472
+ "stable,libtorch,macos,cudanone,cplusplus" :
473
+ "# Currently only available as a Preview." ,
474
+
475
+ "stable,libtorch,macos,cuda8,cplusplus" :
476
+ "# Currently only available as a Preview." ,
477
+
478
+ "stable,libtorch,macos,cuda9.0,cplusplus" :
479
+ "# Currently only available as a Preview." ,
480
+
481
+ "stable,libtorch,macos,cuda9.2,cplusplus" :
482
+ "# Currently only available as a Preview." ,
483
+
484
+ "stable,libtorch,windows,cudanone,cplusplus" :
485
+ "# Currently only available as a Preview." ,
486
+
487
+ "stable,libtorch,windows,cuda8,cplusplus" :
488
+ "# Currently only available as a Preview." ,
489
+
490
+ "stable,libtorch,windows,cuda9.0,cplusplus" :
491
+ "# Currently only available as a Preview." ,
492
+
493
+ "stable,libtorch,windows,cuda9.2,cplusplus" :
494
+ "# Currently only available as a Preview." ,
495
+
421
496
"preview,conda,linux,cuda8,python2.7" :
422
497
"conda install pytorch-nightly -c pytorch" ,
423
498
@@ -704,7 +779,43 @@ function commandMessage(key) {
704
779
"# Preview Build Not Yet Available on Windows." ,
705
780
706
781
"preview,pip,windows,cuda9.2,python3.7" :
707
- "# Preview Build Not Yet Available on Windows."
782
+ "# Preview Build Not Yet Available on Windows." ,
783
+
784
+ "preview,libtorch,linux,cudanone,cplusplus" :
785
+ "Download here: <a href='https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip'>https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip</a>" ,
786
+
787
+ "preview,libtorch,linux,cuda8,cplusplus" :
788
+ "Download here: <a href='https://download.pytorch.org/libtorch/nightly/cu80/libtorch-shared-with-deps-latest.zip'>https://download.pytorch.org/libtorch/nightly/cu80/libtorch-shared-with-deps-latest.zip</a>" ,
789
+
790
+ "preview,libtorch,linux,cuda9.0,cplusplus" :
791
+ "Download here: <a href='https://download.pytorch.org/libtorch/nightly/cu90/libtorch-shared-with-deps-latest.zip'>https://download.pytorch.org/libtorch/nightly/cu90/libtorch-shared-with-deps-latest.zip</a>" ,
792
+
793
+ "preview,libtorch,linux,cuda9.2,cplusplus" :
794
+ "Download here: <a href='https://download.pytorch.org/libtorch/nightly/cu9.2/libtorch-shared-with-deps-latest.zip'>https://download.pytorch.org/libtorch/nightly/cu9.2/libtorch-shared-with-deps-latest.zip</a>" ,
795
+
796
+ "preview,libtorch,macos,cudanone,cplusplus" :
797
+ "Download here: <a href='https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip'>https://download.pytorch.org/libtorch/nightly/cpu/libtorch-macos-latest.zip</a>" ,
798
+
799
+ "preview,libtorch,macos,cuda8,cplusplus" :
800
+ "# Currently only available CPU-only / no CUDA." ,
801
+
802
+ "preview,libtorch,macos,cuda9.0,cplusplus" :
803
+ "# Currently only available CPU-only / no CUDA." ,
804
+
805
+ "preview,libtorch,macos,cuda9.2,cplusplus" :
806
+ "# Currently only available CPU-only / no CUDA." ,
807
+
808
+ "preview,libtorch,windows,cudanone,cplusplus" :
809
+ "# Not currently available on Windows." ,
810
+
811
+ "preview,libtorch,windows,cuda8,cplusplus" :
812
+ "# Not currently available on Windows." ,
813
+
814
+ "preview,libtorch,windows,cuda9.0,cplusplus" :
815
+ "# Not currently available on Windows." ,
816
+
817
+ "preview,libtorch,windows,cuda9.2,cplusplus" :
818
+ "# Not currently available on Windows." ,
708
819
} ;
709
820
710
821
if ( ! object . hasOwnProperty ( key ) ) {
0 commit comments