diff --git a/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim b/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim index 56846d738..cbc556632 100644 --- a/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim +++ b/src/arraymancer/laser/primitives/matrix_multiplication/gemm.nim @@ -9,9 +9,6 @@ import ./gemm_tiling, ./gemm_utils, ./gemm_packing, ./gemm_ukernel_dispatch -from ../../tensor/datatypes import KnownSupportsCopyMem - - when defined(i386) or defined(amd64): import ../../cpuinfo_x86 diff --git a/src/arraymancer/laser/tensor/initialization.nim b/src/arraymancer/laser/tensor/initialization.nim index 7b1b869d8..07ae6177d 100644 --- a/src/arraymancer/laser/tensor/initialization.nim +++ b/src/arraymancer/laser/tensor/initialization.nim @@ -17,6 +17,8 @@ import # Third-party nimblas +export OrderType + when (NimMajor, NimMinor) < (1, 4): import ../../std_version_types @@ -289,7 +291,7 @@ func item*[T_IN, T_OUT](t: Tensor[T_IN], _: typedesc[T_OUT]): T_OUT = # When the input and the output types are Complex, we need to find # the "base" type of the output type (e.g. float32 or float64), # and then convert the real and imaginary parts of the input value - # into the output base type before creating the output complex type + # into the output base type before creating the output complex type type TT = typeof( block: var tmp: T_OUT diff --git a/src/arraymancer/linear_algebra/helpers/init_colmajor.nim b/src/arraymancer/linear_algebra/helpers/init_colmajor.nim index 198cd1911..c08241d44 100644 --- a/src/arraymancer/linear_algebra/helpers/init_colmajor.nim +++ b/src/arraymancer/linear_algebra/helpers/init_colmajor.nim @@ -3,8 +3,7 @@ # This file may not be copied, modified, or distributed except according to those terms. import - ../../laser/tensor/[datatypes, initialization], - nimblas + ../../laser/tensor/[datatypes, initialization] proc newMatrixUninitColMajor*[T](M: var Tensor[T], rows, cols: int) {.noinit, inline.} = var size: int diff --git a/src/arraymancer/private/sequninit.nim b/src/arraymancer/private/sequninit.nim index 8b6daf0d1..58c299cde 100644 --- a/src/arraymancer/private/sequninit.nim +++ b/src/arraymancer/private/sequninit.nim @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +{.used.} # TODO, delete with Nim v2.2 + # from Nim https://github.com/nim-lang/Nim/pull/22739 on the stdlib provides a # `newSeqUninit` for types supporting `supportsCopyMem` when not declared(newSeqUninit): diff --git a/src/arraymancer/tensor/operators_blas_l1.nim b/src/arraymancer/tensor/operators_blas_l1.nim index 4e479f8a5..366ac64a2 100644 --- a/src/arraymancer/tensor/operators_blas_l1.nim +++ b/src/arraymancer/tensor/operators_blas_l1.nim @@ -17,7 +17,6 @@ import ./private/p_checks, ./data_structure, ./accessors, ./higher_order_applymap, nimblas -import complex except Complex32, Complex64 # #################################################################### # BLAS Level 1 (Vector dot product, Addition, Scalar to Vector/Matrix) diff --git a/src/arraymancer/tensor/operators_broadcasted.nim b/src/arraymancer/tensor/operators_broadcasted.nim index fd6d176f9..a05c7a6ee 100644 --- a/src/arraymancer/tensor/operators_broadcasted.nim +++ b/src/arraymancer/tensor/operators_broadcasted.nim @@ -19,7 +19,6 @@ import ./data_structure, ./private/p_empty_tensors import std/math -import complex except Complex64, Complex32 # ######################################################### # # Broadcasting Tensor-Tensor diff --git a/src/arraymancer/tensor/ufunc.nim b/src/arraymancer/tensor/ufunc.nim index 3ed05a4b1..4e1b07bbc 100644 --- a/src/arraymancer/tensor/ufunc.nim +++ b/src/arraymancer/tensor/ufunc.nim @@ -15,7 +15,7 @@ import ./data_structure, ./higher_order_applymap, ./private/p_empty_tensors, - sugar, math, complex + sugar, math ## NOTE: This should be `{.noinit.}`, but this is blocked by: ## https://github.com/nim-lang/Nim/issues/16253 diff --git a/tests/tensor/test_complex.nim b/tests/tensor/test_complex.nim index 3b8cd4c18..d046c4843 100644 --- a/tests/tensor/test_complex.nim +++ b/tests/tensor/test_complex.nim @@ -13,7 +13,7 @@ # limitations under the License. import ../../src/arraymancer -import std/[unittest, math] +import std/unittest proc main() = suite "Basic Complex Tensor Operations": diff --git a/tests/tensor/test_einsum_failed.nim b/tests/tensor/test_einsum_failed.nim index f0d4da445..af926b9a3 100644 --- a/tests/tensor/test_einsum_failed.nim +++ b/tests/tensor/test_einsum_failed.nim @@ -1,4 +1,4 @@ -import ../../src/arraymancer +# import ../../src/arraymancer # A list of tests that are supposed to fail and their error messages we # expect. Set the `toRun` argument to true to see a test fail diff --git a/tests/tests_cpu.nim b/tests/tests_cpu.nim index cac2b2ddc..1a2504c25 100644 --- a/tests/tests_cpu.nim +++ b/tests/tests_cpu.nim @@ -13,7 +13,7 @@ # limitations under the License. {.push warning[Spacing]: off.} -import ../src/arraymancer, +import ./tensor/test_init, ./tensor/test_operators_comparison, ./tensor/test_accessors,