Running 10.7. Python 2.7.3 installed from 64-bit EPD 7.3.
All other examples work.
➜ examples git:(master) python sum.py
CONVERTING double
CONVERTING double[:, :]
CONVERTING double
['d']
str_to_llvmtype(): str = 'f64'
{'blocks': {0: <llvm.core.BasicBlock object at 0x1021c1650>,
24: <llvm.core.BasicBlock object at 0x1021c16d0>,
34: <llvm.core.BasicBlock object at 0x1021c1750>,
37: <llvm.core.BasicBlock object at 0x1021c17d0>,
40: <llvm.core.BasicBlock object at 0x1021c18d0>,
43: <llvm.core.BasicBlock object at 0x1021c1950>,
53: <llvm.core.BasicBlock object at 0x1021c19d0>,
56: <llvm.core.BasicBlock object at 0x1021c1a50>,
59: <llvm.core.BasicBlock object at 0x1021c1b50>,
82: <llvm.core.BasicBlock object at 0x1021c1ad0>,
86: <llvm.core.BasicBlock object at 0x1021c1850>},
'blocks_dom': {0: set([0]),
24: set([0, 24]),
34: set([0, 24, 34, 37, 40, 43, 56, 82]),
37: set([0, 24, 37]),
40: set([0, 24, 37, 40]),
43: set([0, 24, 37, 40, 43]),
53: set([0, 24, 37, 40, 43, 53, 56, 59]),
56: set([0, 24, 37, 40, 43, 56]),
59: set([0, 24, 37, 40, 43, 56, 59]),
82: set([0, 24, 37, 40, 43, 56, 82]),
86: set([0, 24, 37, 86])},
'blocks_in': {0: set(),
24: set([0]),
34: set([82]),
37: set([24, 34]),
40: set([37]),
43: set([40]),
53: set([59]),
56: set([43, 53]),
59: set([56]),
82: set([56]),
86: set([37])},
'blocks_out': {0: set([24]),
24: set([37]),
34: set([37]),
37: set([40, 86]),
40: set([43]),
43: set([56]),
53: set([56]),
56: set([59, 82]),
59: set([53]),
82: set([34]),
86: set()},
'blocks_reaching': {0: set([0]),
24: set([0, 24]),
34: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
37: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
40: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
43: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
53: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
56: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
59: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
82: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82]),
86: set([0, 24, 34, 37, 40, 43, 53, 56, 59, 82, 86])},
'blocks_reads': {0: set([0]),
24: set([1]),
34: set(),
37: set([4]),
40: set(),
43: set([2]),
53: set(),
56: set([5]),
59: set([0, 3, 4, 5]),
82: set(),
86: set([3])},
'blocks_writer': {0: {1: 9, 2: 12, 3: 18},
24: {4: 33},
34: {4: 34},
37: {3: 37, 4: 37},
40: {},
43: {5: 52},
53: {5: 53},
56: {3: 56, 5: 56},
59: {3: 76},
82: {},
86: {}},
'blocks_writes': {0: set([0, 1, 2, 3]),
24: set([4]),
34: set([4]),
37: set([3, 4]),
40: set(),
43: set([5]),
53: set([5]),
56: set([3, 5]),
59: set([3]),
82: set(),
86: set()},
'translator': <numba.translate.Translate object at 0x1021c1410>}
op_LOAD_ATTR(): 3 106 shape <Variable(val=<llvm.core.Argument object at 0x1021c15d0>, llvm=<llvm.core.Argument object at 0x1021c15d0>, typ='arr[f64]')> arr[f64]
op_LOAD_ATTR(): { i64, i32, i8_, i32, i64_, i64_, i8_, i8_, i32, i8_, i8_, i8_, i64_ }*
('op_CALL_FUNCTION():', <Variable(val=, _llvm=None, typ=['func'])>)
str_to_llvmtype(): str = 'f64'
add_phi_incomming(): reaching_defs = {24: {0: 0, 1: 0, 2: 0, 3: 0, 4: 24},
34: {0: 0, 1: 0, 2: 0, 3: 56, 4: 34, 5: 56}}
crnt_block=37, pred=34, local=3
str_to_llvmtype(): str = 'i64'
add_phi_incomming(): reaching_defs = {24: {0: 0, 1: 0, 2: 0, 3: 0, 4: 24},
34: {0: 0, 1: 0, 2: 0, 3: 56, 4: 34, 5: 56}}
crnt_block=37, pred=34, local=4
op_BINARY_ADD(): <Variable(val=<llvm.core.PHINode object at 0x1021c1fd0>, _llvm=<llvm.core.PHINode object at 0x1021c1fd0>, typ='i64')> + <Variable(val=<llvm.core.ConstantInt object at 0x1021c1f50>, _llvm=<llvm.core.ConstantInt object at 0x1021c1f50>, typ='i64')>
resolve_type(): arg1 = <Variable(val=<llvm.core.PHINode object at 0x1021c1fd0>, _llvm=<llvm.core.PHINode object at 0x1021c1fd0>, typ='i64')>, arg2 = <Variable(val=<llvm.core.ConstantInt object at 0x1021c1f50>, _llvm=<llvm.core.ConstantInt object at 0x1021c1f50>, typ='i64')>
resolve_type() ==> 'i64'
resolve_type(): arg1 = <Variable(val=<llvm.core.PHINode object at 0x1021c1fd0>, _llvm=<llvm.core.PHINode object at 0x1021c1fd0>, typ='i64')>, arg2 = <Variable(val=<llvm.core.Instruction object at 0x1021c1c10>, _llvm=<llvm.core.Instruction object at 0x1021c1c10>, typ='i64')>
resolve_type() ==> 'i64'
('op_CALL_FUNCTION():', <Variable(val=, _llvm=None, typ=['func'])>)
str_to_llvmtype(): str = 'f64'
add_phi_incomming(): reaching_defs = {43: {0: 0, 1: 0, 2: 0, 3: 37, 4: 37, 5: 43},
53: {0: 0, 1: 0, 2: 0, 3: 59, 4: 37, 5: 53}}
crnt_block=56, pred=53, local=3
str_to_llvmtype(): str = 'i64'
add_phi_incomming(): reaching_defs = {43: {0: 0, 1: 0, 2: 0, 3: 37, 4: 37, 5: 43},
53: {0: 0, 1: 0, 2: 0, 3: 59, 4: 37, 5: 53}}
crnt_block=56, pred=53, local=5
op_BINARY_ADD(): <Variable(val=<llvm.core.PHINode object at 0x1021d5290>, _llvm=<llvm.core.PHINode object at 0x1021d5290>, typ='i64')> + <Variable(val=<llvm.core.ConstantInt object at 0x1021d5250>, _llvm=<llvm.core.ConstantInt object at 0x1021d5250>, typ='i64')>
resolve_type(): arg1 = <Variable(val=<llvm.core.PHINode object at 0x1021d5290>, _llvm=<llvm.core.PHINode object at 0x1021d5290>, typ='i64')>, arg2 = <Variable(val=<llvm.core.ConstantInt object at 0x1021d5250>, _llvm=<llvm.core.ConstantInt object at 0x1021d5250>, typ='i64')>
resolve_type() ==> 'i64'
resolve_type(): arg1 = <Variable(val=<llvm.core.PHINode object at 0x1021d5290>, _llvm=<llvm.core.PHINode object at 0x1021d5290>, typ='i64')>, arg2 = <Variable(val=<llvm.core.Instruction object at 0x1021c1d90>, _llvm=<llvm.core.Instruction object at 0x1021c1d90>, typ='i64')>
resolve_type() ==> 'i64'
op_BINARY_SUBSCR(): arr_var.typ = arr[f64]
str_to_llvmtype(): str = 'f64'
%24 = load double* %23
op_BINARY_ADD(): <Variable(val=<llvm.core.PHINode object at 0x1021c1d10>, _llvm=<llvm.core.PHINode object at 0x1021c1d10>, typ='f64')> + <Variable(val=<llvm.core.Instruction object at 0x1021d5650>, _llvm=<llvm.core.Instruction object at 0x1021d5650>, typ='f64')>
resolve_type(): arg1 = <Variable(val=<llvm.core.PHINode object at 0x1021c1d10>, _llvm=<llvm.core.PHINode object at 0x1021c1d10>, typ='f64')>, arg2 = <Variable(val=<llvm.core.Instruction object at 0x1021d5650>, _llvm=<llvm.core.Instruction object at 0x1021d5650>, typ='f64')>
resolve_type() ==> 'f64'
; ModuleID = 'csum_mod_1021c1410'
define double @csum({ i64, i32_, i8_, i32, i64_, i64_, i8_, i8_, i32, i8_, i8_, i8_, i64_ }* %arr) {
Entry:
%0 = getelementptr { i64, i32_, i8_, i32, i64_, i64_, i8_, i8_, i32, i8_, i8_, i8_, i64_ }* %arr, i32 0, i32 4
%1 = load i64** %0
%2 = getelementptr i64* %1, i32 0
%3 = load i64* %2
%4 = getelementptr i64* %1, i32 1
%5 = load i64* %4
br label %BLOCK_24
BLOCK_24: ; preds = %Entry
br label %BLOCK_37
BLOCK_34: ; preds = %BLOCK_82
%6 = add i64 %8, 1
br label %BLOCK_37
BLOCK_37: ; preds = %BLOCK_34, %BLOCK_24
%7 = phi double [ 0.000000e+00, %BLOCK_24 ], [ %11, %BLOCK_34 ]
%8 = phi i64 [ 0, %BLOCK_24 ], [ %6, %BLOCK_34 ]
%9 = icmp slt i64 %8, %3
br i1 %9, label %BLOCK_40, label %BLOCK_86
BLOCK_86: ; preds = %BLOCK_37
ret double %7
BLOCK_40: ; preds = %BLOCK_37
br label %BLOCK_43
BLOCK_43: ; preds = %BLOCK_40
br label %BLOCK_56
BLOCK_53: ; preds = %BLOCK_59
%10 = add i64 %12, 1
br label %BLOCK_56
BLOCK_56: ; preds = %BLOCK_53, %BLOCK_43
%11 = phi double [ %7, %BLOCK_43 ], [ %25, %BLOCK_53 ]
%12 = phi i64 [ 0, %BLOCK_43 ], [ %10, %BLOCK_53 ]
%13 = icmp slt i64 %12, %5
br i1 %13, label %BLOCK_59, label %BLOCK_82
BLOCK_82: ; preds = %BLOCK_56
br label %BLOCK_34
BLOCK_59: ; preds = %BLOCK_56
%14 = getelementptr { i64, i32_, i8_, i32, i64_, i64_, i8_, i8_, i32, i8_, i8_, i8_, i64_ }* %arr, i32 0, i32 5
%15 = load i64** %14
%16 = getelementptr i64* %15, i32 0
%17 = load i64* %16
%18 = mul i64 %8, %17
%19 = getelementptr { i64, i32_, i8_, i32, i64_, i64_, i8_, i8_, i32, i8_, i8_, i8_, i64_ }* %arr, i32 0, i32 2
%20 = load i8** %19
%21 = getelementptr i8* %20, i64 %18
%22 = bitcast i8* %21 to double*
%23 = getelementptr double* %22, i64 %12
%24 = load double* %23
%25 = fadd double %11, %24
br label %BLOCK_53
}
Traceback (most recent call last):
File "sum.py", line 13, in
csum = jit(ret_type=d, arg_types=[d[:,:]])(sum)
File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/numba/decorators.py", line 78, in _jit
t = Translate(func, _args, *_kws)
File "/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/numba/translate.py", line 814, in init
self.fco = func.func_code
AttributeError: 'builtin_function_or_method' object has no attribute 'func_code'