From d95f419a53fc74d2ba8ba11072e5f164690b27c3 Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Thu, 4 May 2017 17:28:59 +0300 Subject: [PATCH] v0.2 preparations (#547) * v0.2 preparations * Fix Tensorflow sample. --- CHANGELOG.md | 15 +++++++++++++++ DISTRO_README.md | 2 +- RELEASE_NOTES.md | 11 ++++------- samples/tensorflow/README.md | 4 +++- samples/tensorflow/build.sh | 16 +++++++++++++--- samples/tensorflow/tensorflow.def | 2 +- 6 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000000..2ab10069c8d --- /dev/null +++ b/CHANGELOG.md @@ -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. \ No newline at end of file diff --git a/DISTRO_README.md b/DISTRO_README.md index 15ff8bbbcaf..f042b199f09 100644 --- a/DISTRO_README.md +++ b/DISTRO_README.md @@ -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. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2ddd9592d5a..2b378fd7daf 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -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). @@ -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 ### diff --git a/samples/tensorflow/README.md b/samples/tensorflow/README.md index 5e9db763f5d..8338bbb6ee7 100644 --- a/samples/tensorflow/README.md +++ b/samples/tensorflow/README.md @@ -18,4 +18,6 @@ Compile: Run: - ./HelloTensorflow.kexe \ No newline at end of file + ./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. diff --git a/samples/tensorflow/build.sh b/samples/tensorflow/build.sh index c7b14a117ee..1c0f0ece0f3 100755 --- a/samples/tensorflow/build.sh +++ b/samples/tensorflow/build.sh @@ -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 @@ -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 diff --git a/samples/tensorflow/tensorflow.def b/samples/tensorflow/tensorflow.def index c2114b83511..d846d99a0ae 100644 --- a/samples/tensorflow/tensorflow.def +++ b/samples/tensorflow/tensorflow.def @@ -1,2 +1,2 @@ headers = tensorflow/c/c_api.h -compilerOpts = -I/usr/local/include -L/usr/local/lib \ No newline at end of file +compilerOpts = -I/opt/local/include -L/opt/local/lib