Implementing a function with ARIMA model to run on GPU

I am trying to implement a CUDA function to run on GPU cores to get high computational power at the fog node ( Jetson Xavier NX) for time series data analysis and forecasting.
For time series data forecasting, ARIMA model is used and I was able to implement a function (from statsmodels.tsa.arima_model import ARIMA) which works fine on CPU and I got the predicted results too.

Now I am trying to optimize the same function to run on GPU using @cuda.jit. But, I got an error as below.

**TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name ‘customer_df’: Cannot determine Numba type of <class ‘pandas.core.frame.DataFrame’>
File “”, line 16:

[customer_df : is a panda data frame that I defined to to get the csv data for processing]

I tried some simple matrix calculations in Python to run on GPU using numba. That worked fine. Issue is with the function for time series forecasting which used ARIMA model directly.

model = ARIMA(train, order=(5,1,0)) <--------calling ARIMA to get the predictions
model_fit = model.fit(disp=0)

I went through this resources too Supported Python features in CUDA Python — Numba 0.50.1 documentation. Does it mean that I cannot use methods from ‘statsmodels.tsa.arima_model’ or panda frames etc in a function decorated with ‘@cuda.jit’?

I am a newbie to CUDA and this issue is a blocker for me.

Appreciate if anyone can shed some light.

Thank you and regards

Yes, that is what it means, as I indicated to you here.

Thank you Robert. Don’t we have any other way to implement the function with ARIMA model? Do I need to implement the ARIMA function from the scratch inside the function? Or else is there any supporting libraries that I can use to implement the function?

Yes, one possible approach would be to implement ARIMA function from scratch, using only the supported features of numba cuda python.

Another possible approach would be to use cuml from RAPIDS. RAPIDS can also provide a replacement for pandas, in cudf. This isn’t really the right forum to ask RAPIDS questions. RAPIDS home page is here and you can find the recommended forums and support resources there.

I’m sure there are other possibilities.

1 Like

Great. Thanks again for sharing helpful information.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.