Skip to content

Commit

Permalink
v0.2 preparations (JetBrains#547)
Browse files Browse the repository at this point in the history
* v0.2 preparations

* Fix Tensorflow sample.
  • Loading branch information
olonho authored May 4, 2017
1 parent 6e7cb64 commit d95f419
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## v0.2 ##
* Added support for coroutines
* Fixed most stdlib incompatibilities
* Improved memory management performance
* Cross-module inline function support
* Unicode support independent from installed system locales
* Interoperability improvements
* file-based filtering in definition file
* stateless lambdas could be used as C callbacks
* any Unicode string could be passed to C function
* Very basic debugging support
* Improve compilation and linking performance

## v0.1 ##
Initial technical preview of Kotlin/Native.
2 changes: 1 addition & 1 deletion DISTRO_README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Kotlin/Native #
# Kotlin/Native #

_Kotlin/Native_ is a LLVM backend for the Kotlin compiler, runtime
implementation and native code generation facility using LLVM toolchain.
Expand Down
11 changes: 4 additions & 7 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ the following platforms:

## Compatibility and features ##

To run _Kotlin/Native_ JDK8 or later for the host platform has to be installed.
To run _Kotlin/Native_ JDK8 for the host platform has to be installed.
Note that Java 9 not yet supported.

The language and library version supported by this EAP release mostly match Kotlin 1.1.
However, there are certain limitations, see section [Known Limitations](#limitations).
Expand Down Expand Up @@ -67,12 +68,8 @@ for benchmarking and competitive analysis of any kind.

### Standard Library ###

The standard library in _Kotlin/Native_ is known to be incomplete and doesn't include
certain methods available in standard library of Kotlin.

### Coroutines ###

Coroutines are not yet supported with this release.
The standard library in _Kotlin/Native_ is known to be incomplete and may not include
few methods available in standard library of Kotlin (notably, regular expression-related).

### Reflection ###

Expand Down
4 changes: 3 additions & 1 deletion samples/tensorflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ Compile:

Run:

./HelloTensorflow.kexe
./HelloTensorflow.kexe

You may need to specify `LD_LIBRARY_PATH` or `DYLD_LIBRARY_PATH` to `/opt/local/lib` if TensorFlow dynamic library cannot be found.
16 changes: 13 additions & 3 deletions samples/tensorflow/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

PATH=../../dist/bin:../../bin:$PATH
DIR=.
TF_TARGET_DIRECTORY="/opt/local"

if [ x$TARGET == x ]; then
case "$OSTYPE" in
darwin*) TARGET=macbook ;;
linux*) TARGET=linux ;;
darwin*) TARGET=macbook; TF_TARGET=darwin ;;
linux*) TARGET=linux; TF_TARGET=linux ;;
*) echo "unknown: $OSTYPE" && exit 1;;
esac
fi
Expand All @@ -18,6 +19,15 @@ LINKER_ARGS=${!var}
var=COMPILER_ARGS_${TARGET}
COMPILER_ARGS=${!var} # add -opt for an optimized build.

if [ ! -d $TF_TARGET_DIRECTORY/include/tensorflow ]; then
echo "Installing TensorFlow..."
TF_TYPE="cpu" # Change to "gpu" for GPU support
TF_TARGET_DIRECTORY="/opt/local"
curl -s -L \
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-${TF_TYPE}-${TF_TARGET}-x86_64-1.1.0.tar.gz" |
sudo tar -C $TF_TARGET_DIRECTORY -xz
fi

cinterop -def $DIR/tensorflow.def -copt "$CFLAGS" -target $TARGET -o tensorflow.kt.bc || exit 1
konanc $COMPILER_ARGS -target $TARGET $DIR/HelloTensorflow.kt -library tensorflow.kt.bc -o HelloTensorflow.kexe \
-linkerArgs "-L/usr/local/lib -ltensorflow" || exit 1
-linkerArgs "-L/opt/local/lib -ltensorflow" || exit 1
2 changes: 1 addition & 1 deletion samples/tensorflow/tensorflow.def
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
headers = tensorflow/c/c_api.h
compilerOpts = -I/usr/local/include -L/usr/local/lib
compilerOpts = -I/opt/local/include -L/opt/local/lib

0 comments on commit d95f419

Please sign in to comment.