kmath/examples/build.gradle.kts

124 lines
4.4 KiB
Plaintext
Raw Normal View History

/*
* Copyright 2018-2021 KMath contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
2019-06-08 16:25:51 +03:00
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm")
2020-09-27 19:57:30 +03:00
kotlin("plugin.allopen")
id("kotlinx.benchmark")
2019-06-08 16:25:51 +03:00
}
allOpen.annotation("org.openjdk.jmh.annotations.State")
sourceSets.register("benchmarks")
2019-06-08 16:25:51 +03:00
repositories {
jcenter()
2021-02-21 16:13:40 +03:00
maven("https://repo.kotlin.link")
maven("https://clojars.org/repo")
maven("https://dl.bintray.com/egor-bogomolov/astminer/")
maven("https://dl.bintray.com/hotkeytlt/maven")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://dl.bintray.com/kotlin/kotlinx")
maven("https://dl.bintray.com/mipt-npm/dev")
maven("https://dl.bintray.com/mipt-npm/kscience")
maven("https://jitpack.io")
maven("http://logicrunch.research.it.uu.se/maven/")
mavenCentral()
}
2019-06-08 16:25:51 +03:00
dependencies {
2020-10-12 18:42:34 +03:00
implementation(project(":kmath-ast"))
2020-10-13 15:47:07 +03:00
implementation(project(":kmath-kotlingrad"))
2019-06-08 16:25:51 +03:00
implementation(project(":kmath-core"))
implementation(project(":kmath-coroutines"))
implementation(project(":kmath-commons"))
implementation(project(":kmath-complex"))
2020-10-28 09:16:21 +03:00
implementation(project(":kmath-stat"))
2019-12-08 15:48:25 +03:00
implementation(project(":kmath-viktor"))
2019-12-09 19:52:00 +03:00
implementation(project(":kmath-dimensions"))
implementation(project(":kmath-ejml"))
implementation(project(":kmath-nd4j"))
2020-11-29 13:32:20 +03:00
implementation(project(":kmath-for-real"))
implementation("org.deeplearning4j:deeplearning4j-core:1.0.0-beta7")
implementation("org.nd4j:nd4j-native:1.0.0-beta7")
// uncomment if your system supports AVX2
// val os = System.getProperty("os.name")
//
// if (System.getProperty("os.arch") in arrayOf("x86_64", "amd64")) when {
// os.startsWith("Windows") -> implementation("org.nd4j:nd4j-native:1.0.0-beta7:windows-x86_64-avx2")
// os == "Linux" -> implementation("org.nd4j:nd4j-native:1.0.0-beta7:linux-x86_64-avx2")
// os == "Mac OS X" -> implementation("org.nd4j:nd4j-native:1.0.0-beta7:macosx-x86_64-avx2")
// } else
implementation("org.nd4j:nd4j-native-platform:1.0.0-beta7")
2020-09-27 19:57:30 +03:00
implementation("org.jetbrains.kotlinx:kotlinx-io:0.2.0-npm-dev-11")
implementation("org.jetbrains.kotlinx:kotlinx.benchmark.runtime:0.2.0-dev-20")
2020-09-21 16:56:30 +03:00
implementation("org.slf4j:slf4j-simple:1.7.30")
2020-11-29 13:32:20 +03:00
// plotting
implementation("kscience.plotlykt:plotlykt-server:0.3.1-dev")
"benchmarksImplementation"("org.jetbrains.kotlinx:kotlinx.benchmark.runtime-jvm:0.2.0-dev-20")
2020-09-21 16:56:30 +03:00
"benchmarksImplementation"(sourceSets.main.get().output + sourceSets.main.get().runtimeClasspath)
2019-06-08 16:25:51 +03:00
}
// Configure benchmark
benchmark {
// Setup configurations
2020-09-27 19:57:30 +03:00
targets.register("benchmarks")
// This one matches sourceSet name above
2019-06-08 16:25:51 +03:00
2021-02-19 13:38:32 +03:00
configurations.register("buffer") {
warmups = 1 // number of warmup iterations
iterations = 3 // number of iterations
iterationTime = 500 // time in seconds per iteration
iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
include("BufferBenchmark")
}
2021-01-28 20:04:33 +03:00
configurations.register("dot") {
2020-11-29 22:26:05 +03:00
warmups = 1 // number of warmup iterations
iterations = 3 // number of iterations
iterationTime = 500 // time in seconds per iteration
iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
2021-01-28 20:04:33 +03:00
include("DotBenchmark")
2019-06-08 16:25:51 +03:00
}
2021-02-18 11:17:28 +03:00
configurations.register("expressions") {
warmups = 1 // number of warmup iterations
iterations = 3 // number of iterations
iterationTime = 500 // time in seconds per iteration
iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
include("ExpressionsInterpretersBenchmark")
}
2021-03-14 09:43:22 +03:00
configurations.register("matrixInverse") {
warmups = 1 // number of warmup iterations
iterations = 3 // number of iterations
iterationTime = 500 // time in seconds per iteration
iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
include("MatrixInverseBenchmark")
}
2019-06-08 16:25:51 +03:00
}
kotlin.sourceSets.all {
with(languageSettings) {
useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts")
useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
}
}
2019-06-08 16:25:51 +03:00
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}
2021-01-30 20:12:14 +03:00
readme{
maturity = ru.mipt.npm.gradle.Maturity.EXPERIMENTAL
}