You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the latest release does not officially support AMD OpenCL devices, I really wanted to get this working as I have numerous AMD GPUs available. As far as I could tell, the only real compatibility issue with AMD cards have to do with the fact that the offsets of sub buffers have to be multiples of 256. I spent some time researching the proper way of adjusting the offsets without success, but suspect this to be rather trivial to someone skilled in OpenCL.
In the meantime I found a simple workaround that might be of benefit to others trying to run analyses on AMD cards:
The first erring call in my experience is usually this line:
As the self.sizeof_float is 4 bytes, this will succeed as long as signallength is a multiple of 64.
In turn, signallength's size is determined by (number of samples - max lag sources) * number of replications. If number of samples >> 64 it is not difficult to make small adjustments to the number of samples in order to accommodate this limitation without any impact, however inelegant it might seem.
For example, the following demo runs successfully on my AMD RX580:
# Import classesfromidtxl.multivariate_teimportMultivariateTEfromidtxl.dataimportData# a) Generate test datadata=Data()
data.generate_mute_data(n_samples=2053, n_replications=5)
# b) Initialise analysis object and define settingsnetwork_analysis=MultivariateTE()
settings= {'cmi_estimator': 'OpenCLKraskovCMI',
'max_lag_sources': 5,
'min_lag_sources': 1,
'debug': False}
# (n_samples - max_lag_sources) * n_replications must be a multiple of 256/4# for compatibility with AMD cards# c) Run analysisresults=network_analysis.analyse_network(settings=settings, data=data)
The text was updated successfully, but these errors were encountered:
First, thanks for a great package!
Although the latest release does not officially support AMD OpenCL devices, I really wanted to get this working as I have numerous AMD GPUs available. As far as I could tell, the only real compatibility issue with AMD cards have to do with the fact that the offsets of sub buffers have to be multiples of 256. I spent some time researching the proper way of adjusting the offsets without success, but suspect this to be rather trivial to someone skilled in OpenCL.
In the meantime I found a simple workaround that might be of benefit to others trying to run analyses on AMD cards:
The first erring call in my experience is usually this line:
IDTxl/idtxl/estimators_opencl.py
Lines 300 to 303 in 4ddb995
As the
self.sizeof_float
is 4 bytes, this will succeed as long assignallength
is a multiple of 64.In turn,
signallength
's size is determined by (number of samples - max lag sources) * number of replications. If number of samples >> 64 it is not difficult to make small adjustments to the number of samples in order to accommodate this limitation without any impact, however inelegant it might seem.For example, the following demo runs successfully on my AMD RX580:
The text was updated successfully, but these errors were encountered: