forked from kscience/kmath
e9c31b7827
# Conflicts: # README.md # build.gradle.kts # examples/src/main/kotlin/space/kscience/kmath/stat/DistributionBenchmark.kt # examples/src/main/kotlin/space/kscience/kmath/structures/ParallelRealNDField.kt # kmath-ast/README.md # kmath-ast/build.gradle.kts # kmath-ast/src/commonMain/kotlin/space/kscience/kmath/ast/MstExpression.kt # kmath-complex/README.md # kmath-complex/build.gradle.kts # kmath-complex/src/commonMain/kotlin/space/kscience/kmath/complex/ComplexNDField.kt # kmath-core/README.md # kmath-core/build.gradle.kts # kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MST.kt # kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt # kmath-core/src/commonMain/kotlin/space/kscience/kmath/nd/RealNDField.kt # kmath-core/src/commonMain/kotlin/space/kscience/kmath/structures/RealBufferField.kt # kmath-coroutines/build.gradle.kts # kmath-coroutines/src/commonMain/kotlin/space/kscience/kmath/chains/BlockingRealChain.kt # kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyNDStructure.kt # kmath-dimensions/src/commonTest/kotlin/kscience/dimensions/DMatrixContextTest.kt # kmath-for-real/README.md # kmath-functions/README.md # kmath-functions/src/commonMain/kotlin/space/kscience/kmath/interpolation/Interpolator.kt # kmath-functions/src/commonMain/kotlin/space/kscience/kmath/interpolation/LoessInterpolator.kt # kmath-functions/src/commonMain/kotlin/space/kscience/kmath/interpolation/XYPointSet.kt # kmath-geometry/build.gradle.kts # kmath-nd4j/README.md # kmath-nd4j/build.gradle.kts # kmath-stat/src/commonMain/kotlin/space/kscience/kmath/distributions/FactorizedDistribution.kt # kmath-stat/src/commonMain/kotlin/space/kscience/kmath/stat/Distribution.kt # kmath-stat/src/commonMain/kotlin/space/kscience/kmath/stat/Fitting.kt # kmath-stat/src/commonMain/kotlin/space/kscience/kmath/stat/OptimizationProblem.kt # kmath-stat/src/jvmMain/kotlin/space/kscience/kmath/stat/distributions.kt # kmath-viktor/src/main/kotlin/space/kscience/kmath/viktor/ViktorNDStructure.kt
140 lines
5.0 KiB
Plaintext
140 lines
5.0 KiB
Plaintext
/*
|
|
* 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.
|
|
*/
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
import ru.mipt.npm.gradle.Maturity
|
|
|
|
plugins {
|
|
kotlin("jvm")
|
|
kotlin("plugin.allopen")
|
|
id("org.jetbrains.kotlinx.benchmark")
|
|
}
|
|
|
|
allOpen.annotation("org.openjdk.jmh.annotations.State")
|
|
sourceSets.register("benchmarks")
|
|
|
|
repositories {
|
|
jcenter()
|
|
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{
|
|
setUrl("http://logicrunch.research.it.uu.se/maven/")
|
|
isAllowInsecureProtocol = true
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":kmath-ast"))
|
|
implementation(project(":kmath-kotlingrad"))
|
|
implementation(project(":kmath-core"))
|
|
implementation(project(":kmath-coroutines"))
|
|
implementation(project(":kmath-commons"))
|
|
implementation(project(":kmath-complex"))
|
|
implementation(project(":kmath-stat"))
|
|
implementation(project(":kmath-viktor"))
|
|
implementation(project(":kmath-dimensions"))
|
|
implementation(project(":kmath-ejml"))
|
|
implementation(project(":kmath-nd4j"))
|
|
|
|
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")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-io:0.2.0-npm-dev-11")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.3.0")
|
|
implementation("org.slf4j:slf4j-simple:1.7.30")
|
|
|
|
// plotting
|
|
implementation("kscience.plotlykt:plotlykt-server:0.3.1-dev")
|
|
|
|
"benchmarksImplementation"("org.jetbrains.kotlinx:kotlinx.benchmark.runtime-jvm:0.2.0-dev-20")
|
|
"benchmarksImplementation"(sourceSets.main.get().output + sourceSets.main.get().runtimeClasspath)
|
|
}
|
|
|
|
// Configure benchmark
|
|
benchmark {
|
|
// Setup configurations
|
|
targets.register("benchmarks")
|
|
// This one matches sourceSet name above
|
|
|
|
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")
|
|
}
|
|
|
|
configurations.register("dot") {
|
|
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("DotBenchmark")
|
|
}
|
|
|
|
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")
|
|
}
|
|
|
|
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")
|
|
}
|
|
|
|
configurations.register("bigInt") {
|
|
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("BigIntBenchmark")
|
|
}
|
|
}
|
|
|
|
kotlin.sourceSets.all {
|
|
with(languageSettings) {
|
|
useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts")
|
|
useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
|
|
useExperimentalAnnotation("space.kscience.kmath.misc.UnstableKMathAPI")
|
|
}
|
|
}
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
kotlinOptions{
|
|
jvmTarget = "11"
|
|
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all"
|
|
}
|
|
}
|
|
|
|
readme {
|
|
maturity = Maturity.EXPERIMENTAL
|
|
}
|