Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,23 @@ docs = "cd docs && ./setup.sh"
black = 'black --exclude=".*\.ipynb" --extend-exclude=".venv|.pixi" ./'
isort = 'isort --profile black --skip .venv --skip .pixi ./'
flake8 = 'flake8 --extend-exclude=.venv/,.pixi/ ./'

[tool.pixi.feature.numba-cuda]
platforms = ["linux-64", "linux-aarch64"]

[tool.pixi.feature.numba-cuda-mlir]
platforms = ["linux-64", "linux-aarch64"]

[tool.pixi.feature.numba-cuda.dependencies]
cuda-nvcc = "*"
numba-cuda = "*"
numpy = "<2.5"

[tool.pixi.feature.numba-cuda-mlir.dependencies]
cuda-nvcc = "*"
numba-cuda-mlir = "*"

[tool.pixi.environments]
numba-cuda = ["numba-cuda"]
numba-cuda-mlir = ["numba-cuda-mlir"]

7 changes: 6 additions & 1 deletion stumpy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
import warnings

import numpy as np
from numba import cuda, njit, prange
from numba import njit, prange

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda
from scipy import linalg
from scipy.ndimage import maximum_filter1d, minimum_filter1d
from scipy.spatial.distance import cdist
Expand Down
6 changes: 5 additions & 1 deletion stumpy/gpu_aamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import os

import numpy as np
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

from . import config, core
from .mparray import mparray
Expand Down
6 changes: 5 additions & 1 deletion stumpy/gpu_stump.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import os

import numpy as np
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

from . import config, core
from .gpu_aamp import gpu_aamp
Expand Down
6 changes: 5 additions & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
import numpy.testing as npt
import pandas as pd
import pytest
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda
from scipy.spatial.distance import cdist

from stumpy import config, core, rng
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_aamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import numpy as np
import numpy.testing as npt
import pandas as pd
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

from stumpy import config, rng

Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_aamp_ostinato.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import mersenne
import numpy as np
import numpy.testing as npt
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

try:
from numba.errors import NumbaPerformanceWarning
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_aamp_stimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import numpy as np
import numpy.testing as npt
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

if cuda.is_available():
from stumpy.gpu_aamp_stimp import gpu_aamp_stimp
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_aampdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import numpy as np
import numpy.testing as npt
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

if cuda.is_available():
from stumpy.gpu_aampdist import gpu_aampdist
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_mpdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

import numpy as np
import numpy.testing as npt
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

if cuda.is_available():
from stumpy.gpu_mpdist import gpu_mpdist
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_ostinato.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import numpy as np
import numpy.testing as npt
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

try:
from numba.errors import NumbaPerformanceWarning
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_stimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

import numpy as np
import numpy.testing as npt
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

if cuda.is_available():
from stumpy.gpu_stimp import gpu_stimp
Expand Down
6 changes: 5 additions & 1 deletion tests/test_gpu_stump.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
import numpy as np
import numpy.testing as npt
import pandas as pd
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

from stumpy import config, rng

Expand Down
6 changes: 5 additions & 1 deletion tests/test_non_normalized_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import numpy.testing as npt
import tornado.ioloop
from dask.distributed import Client, LocalCluster
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

from stumpy import core, rng
from stumpy.aamp import aamp
Expand Down
6 changes: 5 additions & 1 deletion tests/test_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import numpy as np
import numpy.testing as npt
import pytest
from numba import cuda

try:
from numba_cuda_mlir import cuda
except ModuleNotFoundError:
from numba import cuda

from stumpy import config, core, rng, sdp

Expand Down
Loading