Skip to content

Commit 9492212

Browse files
committed
Improve compilation time on Windows
+ few fixes for release
1 parent 158cb35 commit 9492212

File tree

7 files changed

+63
-24
lines changed

7 files changed

+63
-24
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ jobs:
123123
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'CI build')
124124
runs-on: windows-latest
125125
needs: prepare
126-
# strategy:
127-
# matrix:
128-
# ext: ["", -mkl, -gpu, -mkl-gpu]
126+
strategy:
127+
matrix:
128+
ext: ["", -mkl, -gpu, -mkl-gpu]
129129
steps:
130130
- name: Configure page file
131131
uses: al-cheb/[email protected]

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ systems, you should add the following dependencies:
8585
<dependency>
8686
<groupId>org.tensorflow</groupId>
8787
<artifactId>tensorflow-core-api</artifactId>
88-
<version>0.2.0-SNAPSHOT</version>
88+
<version>0.2.0</version>
8989
</dependency>
9090
<dependency>
9191
<groupId>org.tensorflow</groupId>
9292
<artifactId>tensorflow-core-api</artifactId>
93-
<version>0.2.0-SNAPSHOT</version>
93+
<version>0.2.0</version>
9494
<classifier>linux-x86_64${javacpp.platform.extension}</classifier>
9595
</dependency>
9696
```
@@ -101,24 +101,24 @@ native dependencies as follows:
101101
<dependency>
102102
<groupId>org.tensorflow</groupId>
103103
<artifactId>tensorflow-core-api</artifactId>
104-
<version>0.2.0-SNAPSHOT</version>
104+
<version>0.2.0</version>
105105
</dependency>
106106
<dependency>
107107
<groupId>org.tensorflow</groupId>
108108
<artifactId>tensorflow-core-api</artifactId>
109-
<version>0.2.0-SNAPSHOT</version>
109+
<version>0.2.0</version>
110110
<classifier>linux-x86_64${javacpp.platform.extension}</classifier>
111111
</dependency>
112112
<dependency>
113113
<groupId>org.tensorflow</groupId>
114114
<artifactId>tensorflow-core-api</artifactId>
115-
<version>0.2.0-SNAPSHOT</version>
115+
<version>0.2.0</version>
116116
<classifier>macosx-x86_64${javacpp.platform.extension}</classifier>
117117
</dependency>
118118
<dependency>
119119
<groupId>org.tensorflow</groupId>
120120
<artifactId>tensorflow-core-api</artifactId>
121-
<version>0.2.0-SNAPSHOT</version>
121+
<version>0.2.0</version>
122122
<classifier>windows-x86_64${javacpp.platform.extension}</classifier>
123123
</dependency>
124124
```
@@ -131,7 +131,7 @@ artifact includes transitively all the artifacts above as a single dependency:
131131
<dependency>
132132
<groupId>org.tensorflow</groupId>
133133
<artifactId>tensorflow-core-platform${javacpp.platform.extension}</artifactId>
134-
<version>0.2.0-SNAPSHOT</version>
134+
<version>0.2.0</version>
135135
</dependency>
136136
```
137137

@@ -173,7 +173,8 @@ This table shows the mapping between different version of TensorFlow for Java an
173173
| TensorFlow Java Version | TensorFlow Version |
174174
| ------------- | ------------- |
175175
| 0.1.0-SNAPSHOT | 2.2.0 |
176-
| 0.2.0-SNAPSHOT | 2.3.0 |
176+
| 0.2.0-SNAPSHOT | 2.3.1 |
177+
| 0.2.0 | 2.3.1 |
177178

178179
## How to Contribute?
179180

RELEASE.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,13 @@ version number.
5858
3. Update the version of the Maven artifacts to the full version of the release
5959
```
6060
mvn versions:set -DnewVersion=1.0.0
61-
```
62-
4. Commit the changes and push the new branch to the GitHub repository
61+
```
62+
4. In the [README.md](https://github.com/tensorflow/java/blob/master/README.md) file,
63+
update the ['Using Maven Artifacts'](https://github.com/tensorflow/java/blob/master/README.md#using-maven-artifacts)
64+
section and the ['TensorFlow Version Support'](https://github.com/tensorflow/java/blob/master/README.md#tensorflow-version-support)
65+
table to reflect the new version being released.
66+
67+
5. Commit the changes and push the new branch to the GitHub repository
6368
```
6469
git add .
6570
git commit -m "Releasing 1.0.0"
@@ -83,8 +88,13 @@ version number.
8388
4. Update the version of the Maven artifacts to the full version of the release
8489
```
8590
mvn versions:set -DnewVersion=1.0.1
86-
```
87-
4. Commit the changes and push the branch to the GitHub repository
91+
```
92+
5. In the [README.md](https://github.com/tensorflow/java/blob/master/README.md) file,
93+
update the ['Using Maven Artifacts'](https://github.com/tensorflow/java/blob/master/README.md#using-maven-artifacts)
94+
section and the ['TensorFlow Version Support'](https://github.com/tensorflow/java/blob/master/README.md#tensorflow-version-support)
95+
table to reflect the new version being released.
96+
97+
6. Commit the changes and push the branch to the GitHub repository
8898
```
8999
git add .
90100
git commit -m "Releasing 1.0.1"
@@ -109,7 +119,7 @@ To do so, follow the same steps as the [CI build](https://github.com/tensorflow/
109119
for the same platform and make sure to checkout the release branch and to provide your Sonatype credentials
110120
for temporary staging.
111121
112-
### Building and deploying all artifacts to Sonatype
122+
### Performing the release
113123
114124
1. At the root of your TensorFlow Java copy, create a Maven settings.xml file with your OSSRH credentials and
115125
your GPG key passphrase:
@@ -162,29 +172,53 @@ for temporary staging.
162172
of your release and click `Close` and `Release` to finalize the release. You always have the option
163173
to `Drop` it to abort and restart if something went wrong.
164174
165-
4. Some things of note:
175+
4. Go to GitHub and create a release tag on the release branch with a summary of what the version includes.
176+
177+
Some things of note:
166178
- For details, look at the [Sonatype guide](http://central.sonatype.org/pages/releasing-the-deployment.html).
167179
- Syncing with [Maven Central](http://repo1.maven.org/maven2/org/tensorflow/)
168180
can take 10 minutes to 2 hours (as per the [OSSRH
169181
guide](http://central.sonatype.org/pages/ossrh-guide.html#releasing-to-central)).
170182
171183
### Finishing a release
172184
173-
Go to GitHub and create a release tag at the release branch with a summary of what the version includes.
174-
175185
#### Major or minor release
176186
177-
1. In your local copy, checkout the master branch and increase the next snapshot version.
187+
1. Checkout the master branch and merge back changes from the released branch
188+
```
189+
git checkout master
190+
git merge r1.0
191+
```
192+
2. In your local copy, checkout the master branch and increase the next snapshot version.
178193
```
179194
mvn versions:set -DnewVersion=1.1.0-SNAPSHOT
180195
```
181-
2. Commit your changes and push the master branch to the GitHub repository
196+
3. In the [README.md](https://github.com/tensorflow/java/blob/master/README.md) file,
197+
update the ['Using Maven Artifacts'](https://github.com/tensorflow/java/blob/master/README.md#using-maven-artifacts)
198+
section and the ['TensorFlow Version Support'](https://github.com/tensorflow/java/blob/master/README.md#tensorflow-version-support)
199+
table to reflect the new snapshot version.
200+
201+
4. Commit your changes and push the master branch to the GitHub repository
182202
```
183203
git add .
184204
git commit -m "Increase version for next iteration"
185205
git push
186206
```
187207
208+
#### Patch release
209+
210+
1. Checkout the master branch and merge back changes from the released branch
211+
```
212+
git checkout master
213+
git merge r1.0
214+
```
215+
2. Commit the changes and push the master branch to the GitHub repository
216+
```
217+
git add .
218+
git commit -m "Merge release 1.0.1"
219+
git push
220+
```
221+
188222
## References
189223
190224
- [Sonatype guide](http://central.sonatype.org/pages/ossrh-guide.html) for

tensorflow-core/tensorflow-core-api/.bazelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ build:windows --verbose_failures
285285
# On windows, we never cross compile
286286
build:windows --distinct_host_configuration=false
287287

288+
# Following option reduces considerably the compilation time on Windows with VS16.4+
289+
build:windows --copt=/d2ReducedOptimizeHugeFunctions
290+
build:windows --host_copt=/d2ReducedOptimizeHugeFunctions
291+
288292
# Suppress all warning messages.
289293
build:short_logs --output_filter=DONT_MATCH_ANYTHING
290294

tensorflow-core/tensorflow-core-platform-gpu/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
-->
6565
<profiles>
6666
<profile>
67-
<id>release</id>
67+
<id>releasing</id>
6868
<dependencies>
6969
<dependency>
7070
<groupId>org.bytedeco</groupId>

tensorflow-core/tensorflow-core-platform-mkl-gpu/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
-->
7676
<profiles>
7777
<profile>
78-
<id>release</id>
78+
<id>releasing</id>
7979
<dependencies>
8080
<dependency>
8181
<groupId>org.bytedeco</groupId>

tensorflow-core/tensorflow-core-platform-mkl/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
-->
9494
<profiles>
9595
<profile>
96-
<id>release</id>
96+
<id>releasing</id>
9797
<dependencies>
9898
<dependency>
9999
<groupId>org.bytedeco</groupId>

0 commit comments

Comments
 (0)