Skip to content

Commit

Permalink
Update Usage.md with optimization flag.
Browse files Browse the repository at this point in the history
Add link to FAQ about optimization flag and add -O flag to Ubuntu's command.
  • Loading branch information
Lê Khắc Hồng Phúc authored Apr 30, 2018
1 parent 5c8d834 commit 99b3b0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $ swift -O inference.swift
[[0.680704]]
```

**Note:** the `-O` flag enables Swift to run with optimizations. This is currently required for some programs that use the `TensorFlow` module to run properly. This will become unnecessary when the compiler implementation is completed.
**Note:** the `-O` flag enables Swift to run with optimizations. This is currently required for some programs that use the `TensorFlow` module to run properly. This will become unnecessary when the compiler implementation is completed. Check out the [FAQ](https://github.com/tensorflow/swift/blob/master/FAQ.md#why-do-i-get-error-array-input-is-not-a-constant-array-of-tensors) for more details.

The Swift interpreter ran your program and printed the classifier's prediction, as expected.

Expand All @@ -98,7 +98,7 @@ If you get an error from running `./inference.swift` directly but not from `swif
## Compiler

With the Swift compiler, you can compile Swift programs into executable binaries. To try it, run the following:
* Ubuntu: `swiftc inference.swift`
* Ubuntu: `swiftc -O inference.swift`
* Mac:
```
swiftc -O -sdk `xcrun --show-sdk-path` inference.swift
Expand Down

0 comments on commit 99b3b0a

Please sign in to comment.