Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

OptFramework failed to optimize function-Array{Any,1} is incompatible with its type in lambda Void #150

@ig0xb

Description

@ig0xb

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.

 @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions