forked from kscience/kmath
Add withChecks to most tests
This commit is contained in:
parent
391eb28cad
commit
c9dfb6a08c
@ -188,3 +188,7 @@ tasks {
|
||||
systemProperty("java.library.path", cppBuildDir.toString())
|
||||
}
|
||||
}
|
||||
|
||||
// No JS implementation
|
||||
project.gradle.startParameter.excludedTaskNames.add("jsTest")
|
||||
project.gradle.startParameter.excludedTaskNames.add("jsBrowserTest")
|
@ -6,15 +6,19 @@ import kotlin.test.*
|
||||
internal class TestAutograd {
|
||||
@Test
|
||||
fun testAutoGrad() = TorchTensorFloatAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingAutoGrad(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testBatchedAutoGrad() = TorchTensorFloatAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingBatchedAutoGrad(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -47,9 +47,11 @@ class TestTorchTensor {
|
||||
|
||||
@Test
|
||||
fun testViewWithNoCopy() = TorchTensorIntAlgebra {
|
||||
withChecks {
|
||||
withCuda {
|
||||
device -> testingViewWithNoCopy(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -7,44 +7,56 @@ internal class TestTorchTensorAlgebra {
|
||||
|
||||
@Test
|
||||
fun testScalarProduct() = TorchTensorRealAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingScalarProduct(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testMatrixMultiplication() = TorchTensorRealAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingMatrixMultiplication(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testLinearStructure() = TorchTensorRealAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingLinearStructure(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testTensorTransformations() = TorchTensorRealAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingTensorTransformations(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testBatchedSVD() = TorchTensorRealAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingBatchedSVD(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testBatchedSymEig() = TorchTensorRealAlgebra {
|
||||
withChecks {
|
||||
withCuda { device ->
|
||||
testingBatchedSymEig(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user