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
{{ message }}
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
I am getting the following error when i use ParallelAccelerator.
OptFramework failed to optimize function ##load_pickle_data#322 in optimization pass ParallelAccelerator.Driver.toParallelIR with error typeOf Opr _8::Array{Any,1} is incompatible with its type in lambda Void
I am loading 5 different python pickle dataset using Pycall package and it is passed into the below function as Array to concatenate into one single array for further processing. When i run this function i get the above mentioned array.
@acc begin
function load_pickle_data(ROOT)
//ROOT is the path where the files are located
xs=[]
ys=[]
for b=1:5
f=joinpath(ROOT, string("data_batch_",b))
//files are named as data_batch_1 and so on...
X,Y = pickle_batch(f)
//Passed to Pycall function for loading one file at a time
// X is of type Array{UInt8,4}
// Y is of type Array{Any,1}
push!(xs,X)
push!(ys,Y)
X= nothing
Y= nothing
end
xscat = vcat(xs...)
yscat = vcat(ys...)
xs = nothing
ys = nothing
(1.0.*xscat,1.0.*yscat) //Return the results
end
end
Kindly let me know what am i doing wrong if i want to optimise the function using ParallelAccelerator.
Thank You
The text was updated successfully, but these errors were encountered:
What operations were you hoping would be parallelized here?
With the C backend (the default under Julia 0.5), the functions optimized with ParallelAccelerator need to be type stable. The above function is not. You have xs first as an array and then later as "nothing." Why are you setting the variables to "nothing" when you're done with them?
ParallelAccelerator with the C backend doesn't handle "Any". So, if you have Array{Any,1}, it isn't going to support that. That should be supported with the native backend.
In general, I'd suggest creating small kernels that you believe should parallelize. So, a general idea would be to split I/O from the parallel computation.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I am getting the following error when i use ParallelAccelerator.
OptFramework failed to optimize function ##load_pickle_data#322 in optimization pass ParallelAccelerator.Driver.toParallelIR with error typeOf Opr _8::Array{Any,1} is incompatible with its type in lambda Void
I am loading 5 different python pickle dataset using Pycall package and it is passed into the below function as Array to concatenate into one single array for further processing. When i run this function i get the above mentioned array.
Kindly let me know what am i doing wrong if i want to optimise the function using ParallelAccelerator.
Thank You
The text was updated successfully, but these errors were encountered: