Module Expr Str Import alias identifier Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore BinOpAdd Call NameLoad NameLoad SubscriptLoad NameLoad Slice Num Num NameLoad Return TupleLoad NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult BinOpMult NameLoad NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpMult NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad NameLoad Assign NameStore BoolOpAnd CompareGtE NameLoad Num CompareLt NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad NameLoad Assign NameStore BoolOpAnd NameLoad CompareGtE NameLoad Num CompareLt NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad If BoolOpAnd NameLoad CompareGtE NameLoad Num CompareLt NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Call NameLoad NameLoad Num attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Call NameLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Num NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Index Num Slice Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Print BinOpMod Str TupleLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword NameLoad Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub BinOpMult NameLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub BinOpMult NameLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpSub BinOpMult NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Index NameLoad Index NameLoad Slice Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice AugAssignAdd SubscriptStore NameLoad ExtSlice Index NameLoad Slice Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Index NameLoad Index NameLoad Slice AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Index NameLoad Index NameLoad Slice attr For TupleStore NameStore NameStore NameStore NameStore NameStore TupleLoad TupleLoad Str NameLoad NameLoad NameLoad NameLoad TupleLoad Str NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice attr NameLoad NameLoad TupleLoad Str NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad body Print NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assert CompareLt NameLoad Num Assert CompareLt NameLoad Num Assert Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num keyword Num Assert Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num keyword Num Delete NameDel Delete NameDel decorator_list If CompareEq NameLoad Str body Assign NameStore ListLoad TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num TupleLoad Num Num Num Expr Call NameLoad NameLoad
N/A N/A 
To test conv layer operations between NervanaGPU, NervanaCPU against numpy.
The numpy implementation is different from what is done underneath NervanaCPU to
be a valid checking. It requires externally pad the input, while NervanaCPU does
not require so
 N/A itertools itt N/A numpy np operator mul neon.backends.nervanagpu NervanaGPU neon.backends.nervanacpu NervanaCPU tests.utils allclose_with_out timeit default_timer slicable N/A N/A dim pad N/A 0 N/A N/A 
    colapse outer dimensions into one and preserve inner dimension
    this allows for easy cpu convolution in numpy

    Arguments:
        dim (tuple): dimensions list in a tuple
        pad (int):  how many pixel paddings
     N/A dim0 N/A N/A reduce mul N/A dim N/A -1 1 pad N/A N/A dim0 N/A dim N/A -1 N/A pixel_indices N/A N/A conv mt pr qs N/A N/A N/A N/A T R S N/A conv TRS N/A N/A D H W N/A conv DHW N/A C N/A conv C N/A HW N/A H W N/A DHW N/A N/A D H W N/A imax N/A C DHW N/A idx N/A N/A c N/A range C N/A N/A ci N/A c DHW N/A t N/A range T N/A N/A z N/A mt t N/A zi N/A ci N/A z HW N/A zb N/A N/A z 0 N/A z D N/A r N/A range R N/A N/A y N/A pr r N/A yi N/A zi N/A y W N/A yb N/A zb N/A y 0 N/A y H N/A s N/A range S N/A N/A x N/A qs s N/A N/A yb N/A x 0 N/A x W N/A N/A xi N/A yi x N/A N/A xi imax N/A N/A N/A idx append xi N/A idx N/A run_backend_conv N/A N/A lib layer I F E dtype N/A N/A N/A beI N/A N/A lib array I dtype dtype N/A beF N/A N/A lib array F dtype dtype N/A beE N/A N/A lib array E dtype dtype N/A beO N/A N/A lib zeros N/A layer dimO dtype dtype N/A N/A N/A lib fprop_conv layer beI beF beO N/A beB N/A N/A lib zeros N/A layer dimI dtype dtype N/A N/A N/A lib bprop_conv layer beF beE beB N/A beU N/A N/A lib zeros N/A layer dimF dtype dtype N/A N/A N/A lib update_conv layer beI beE beU N/A N/A beO beB beU N/A pytest_generate_tests N/A N/A metafunc N/A N/A N/A 
    Build a list of test arguments.

     N/A N_C_K N/A N/A 64 64 64 N/A 32 1 128 N/A D_H_W N/A N/A 3 7 58 N/A 3 13 68 N/A T_R_S N/A N/A 3 3 3 N/A 1 3 3 N/A 1 1 5 N/A pad_d_h_w N/A N/A 0 1 1 N/A 0 0 1 N/A str_d_h_w N/A N/A 1 1 1 N/A 1 1 2 N/A N/A fargs_tests N/A metafunc fixturenames N/A N/A fargs N/A N/A itt product N_C_K D_H_W T_R_S pad_d_h_w str_d_h_w N/A N/A N/A metafunc parametrize fargs_tests fargs N/A test_conv_layer N/A N/A fargs_tests device_id N/A N/A N/A dtype N/A np float32 N/A ng N/A NervanaGPU stochastic_round False bench True device_id device_id N/A N/A N C K N/A fargs_tests N/A 0 N/A N/A D H W N/A fargs_tests N/A 1 N/A N/A T R S N/A fargs_tests N/A 2 N/A N/A padding_d padding_h padding_w N/A fargs_tests N/A 3 N/A N/A strides_d strides_h strides_w N/A fargs_tests N/A 4 N/A conv_ng N/A N/A ng conv_layer dtype N C K D H W T R S padding_d padding_h padding_w strides_d strides_h strides_w N/A nc N/A NervanaCPU N/A conv_nc N/A N/A nc conv_layer dtype N C K D H W T R S padding_d padding_h padding_w strides_d strides_h strides_w N/A N/A N/A conv_nc dimI N/A conv_ng dimI N/A N/A N/A conv_nc dimF N/A conv_ng dimF N/A N/A N/A conv_nc dimO N/A conv_ng dimO N/A N/A N/A conv_nc M N/A conv_ng M N/A dimI N/A conv_ng dimI N/A dimF N/A conv_ng dimF N/A dimO N/A conv_ng dimO N/A cpuI N/A N/A N/A N/A N/A np random uniform -0.8 0.8 N/A slicable dimI 1 astype N/A np float32 N/A cpuF N/A N/A N/A N/A N/A np random uniform 0.0 0.3 N/A slicable dimF astype N/A np float32 N/A cpuE N/A N/A N/A N/A N/A np random uniform -0.2 0.2 dimO astype N/A np float32 N/A N/A cpuI N/A N/A -1 N/A 0.0 N/A beI N/A N/A N/A cpuI N/A N/A -1 N/A reshape dimI N/A beF N/A N/A cpuF reshape dimF N/A beE cpuE N/A start_gpu N/A default_timer N/A N/A ngO ngB ngU N/A run_backend_conv ng conv_ng beI beF beE dtype N/A end_gpu N/A default_timer N/A start_cpu N/A default_timer N/A N/A ncO ncB ncU N/A run_backend_conv nc conv_nc beI beF beE dtype N/A end_cpu N/A default_timer N/A N/A gputime: %s, cputime %s N/A N/A end_gpu start_gpu N/A end_cpu start_cpu N/A cpuO N/A N/A np zeros dimO dtype dtype N/A cpuB N/A N/A np zeros N/A slicable dimI 1 dtype dtype N/A cpuU N/A N/A np zeros N/A slicable dimF dtype dtype N/A N/A D H W N/A conv_nc DHW N/A N/A T R S N/A conv_nc TRS N/A N/A M P Q N/A conv_nc MPQ N/A N/A pad_d pad_h pad_w N/A conv_nc padding N/A N/A str_d str_h str_w N/A conv_nc strides N/A m N/A range M N/A N/A mt N/A N/A m str_d pad_d N/A p N/A range P N/A N/A pr N/A N/A p str_h pad_h N/A q N/A range Q N/A N/A qs N/A N/A q str_w pad_w N/A idx N/A pixel_indices conv_nc mt pr qs N/A N/A cpuO N/A N/A N/A m N/A p N/A q N/A N/A N/A np dot N/A cpuF T N/A cpuI N/A N/A idx N/A N/A N/A cpuB N/A N/A idx N/A N/A N/A np dot cpuF N/A cpuE N/A N/A N/A m N/A p N/A q N/A N/A cpuU N/A N/A np dot N/A cpuI N/A N/A idx N/A N/A N/A cpuE N/A N/A N/A m N/A p N/A q N/A T N/A N/A op ngA ncA cpuA w N/A N/A fprop ngO ncO cpuO Q N/A bprop ngB N/A N/A ncB reshape dimI N/A N/A N/A cpuB N/A N/A -1 N/A reshape dimI W N/A update ngU N/A N/A ncU reshape dimF N/A N/A cpuU reshape dimF S N/A N/A op N/A ncAnp N/A N/A N/A N/A ncA get astype N/A np float32 N/A ngAnp N/A N/A N/A N/A ngA get astype N/A np float32 N/A ncdif N/A cpuA ncAnp N/A ngdif N/A cpuA ngAnp N/A maxval N/A N/A N/A abs cpuA max N/A ncmaxdif N/A N/A N/A abs ncdif max N/A ngmaxdif N/A N/A N/A abs ngdif max N/A ncRatio N/A ncmaxdif maxval N/A ngRatio N/A ngmaxdif maxval N/A N/A ncRatio 1e-05 N/A N/A ngRatio 1e-05 N/A N/A allclose_with_out N/A N/A ncA get cpuA rtol 0 atol 0.0001 N/A N/A allclose_with_out N/A N/A ngA get cpuA rtol 0 atol 0.001 N/A ng N/A nc N/A N/A N/A __name__ __main__ N/A N/A fargs N/A N/A 32 1 1280 N/A 1 13 657 N/A 1 1 11 N/A 0 0 5 N/A 1 1 2 N/A N/A test_conv_layer fargs