Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
542 commits
Select commit Hold shift + click to select a range
f69cad9
Minor fix to fix DeclarationFiller tests.
mnpatil17 Jan 3, 2015
cc904f7
Added hasattr safeguard for the BinaryOp assumption.
mnpatil17 Jan 3, 2015
ea41888
Added type-inference support for function calls.
mnpatil17 Jan 3, 2015
2a608f2
Patched incorrect output bug caused by the addition of FunctionCall h…
mnpatil17 Jan 3, 2015
54da766
fixed case where we had var1 = 5 + var2 breaking.
mnpatil17 Jan 3, 2015
b8d32c4
fixed the case where there was a BinaryOp that consisted of a functio…
mnpatil17 Jan 3, 2015
2838c52
Merge pull request #33 from ucb-sejits/mult-assign-feature
mnpatil17 Jan 3, 2015
237b08a
Added lambda function tests. Tests pass.
mnpatil17 Jan 3, 2015
ab18d8c
fixed missing 'reason' arg in test_dot_manager unittest.skip
pyprogrammer Jan 4, 2015
880bf42
reverted changes on transformations because we need to parse the assi…
pyprogrammer Jan 4, 2015
ce9a078
added more tests for test_xforms binops.
pyprogrammer Jan 4, 2015
b63f5fb
added tests for test_xforms augassigns
pyprogrammer Jan 4, 2015
6828294
added a few simple tests for multiple assign.
mnpatil17 Jan 4, 2015
0b26b6c
Added all multiple assign tests.
mnpatil17 Jan 4, 2015
58d5acf
added range tests in test_xforms, added functioncall types in declfil…
pyprogrammer Jan 4, 2015
6a32c18
Merge conflicts resolved, ____temp__ notation for multiple assign swa…
mnpatil17 Jan 4, 2015
e78da5f
rewrote fib in test_declfiller to make more pythonic and test more st…
pyprogrammer Jan 4, 2015
3efbac4
skipping lambda tests if py3k since args are different in py3k
pyprogrammer Jan 4, 2015
f5cb2d9
forgot that skips require reasons. provided reasons.
pyprogrammer Jan 4, 2015
7964b2f
got < and >= mixed up on skipIfs. Getting kinda late for me to keep w…
pyprogrammer Jan 4, 2015
3adf348
Minor code cleanup
mnpatil17 Jan 4, 2015
de7d2a0
fixed multiple assign for arbitrary nesting, i.e. a,(b,(c,d),e) = 1,(…
pyprogrammer Jan 5, 2015
b71ca5e
merged conflicts
pyprogrammer Jan 5, 2015
fea53bd
added a bit of coverage for 'jit.getFile', made itertools.izip_longes…
pyprogrammer Jan 5, 2015
1d20473
Merge pull request #36 from ucb-sejits/caching-development
mnpatil17 Jan 5, 2015
35c051b
removed extraneous commits
pyprogrammer Jan 5, 2015
8978033
added ignore_errors to deletion in case files were deleted already
pyprogrammer Jan 5, 2015
ab957b3
Merge pull request #37 from ucb-sejits/src-deletion-feature
pyprogrammer Jan 6, 2015
a221e5e
modifed get_common_ctype to return a type if they aren't all the same…
pyprogrammer Jan 6, 2015
fa51d4b
merged
pyprogrammer Jan 6, 2015
ed6859e
added List -> array. Sizes need to be set first though
pyprogrammer Jan 6, 2015
a6d5766
reverted back to the __init__(py_ast) because of compatibility. Prese…
pyprogrammer Jan 9, 2015
e909874
got test_specfuncs back working, made it so that we don't have screwe…
pyprogrammer Jan 9, 2015
9432478
apparently sometimes getting things back out of info.json gives unico…
pyprogrammer Jan 9, 2015
0d28432
removed _hash (from commented out), added tests to test_jit
pyprogrammer Jan 9, 2015
f550d4f
removed copy.deepcopy of transform_result since py3k was complaining.
pyprogrammer Jan 9, 2015
f9f2a17
forgot that py3k has symbolrefs instead of Name nodes in functiondecls
pyprogrammer Jan 9, 2015
bf83536
added quotes to subprocess call to escape random chars
pyprogrammer Jan 10, 2015
0051f98
Merge pull request #39 from ucb-sejits/abandon-classes
pyprogrammer Jan 10, 2015
ed74c53
testing travis caching
pyprogrammer Jan 11, 2015
94f5b11
testing travis caching
pyprogrammer Jan 11, 2015
265c788
ignore compiled folder. How do you dynamically decide based on .ctree…
pyprogrammer Jan 12, 2015
f0173f8
sometimes name doesn't exist. ignore case for now
pyprogrammer Jan 13, 2015
043aa23
findall should look for child classes, not just the same class
pyprogrammer Jan 13, 2015
2f9364c
jit.py reenabled no-kernel direct cache lookup for when there is exis…
pyprogrammer Jan 13, 2015
6407c62
Merge pull request #40 from ucb-sejits/loop-development
pyprogrammer Jan 13, 2015
ebeb376
Preliminary work using new opentuner api.
leonardt Feb 2, 2015
3f0e269
Print tuning results
leonardt Feb 5, 2015
68498d0
Use llvmlite
leonardt Feb 5, 2015
f871753
Added cache disabling feature to defaults.cfg, and the feature can di…
mnpatil17 Feb 10, 2015
bff841b
Added cache enable/disable command to ctree.
mnpatil17 Feb 10, 2015
28b3a48
Added cache clearing mechanism as a ctree command.
mnpatil17 Feb 10, 2015
3b0f9b7
Shortened cache enable and disable commands.
mnpatil17 Feb 10, 2015
bc2d0f2
Merge pull request #43 from ucb-sejits/caching-frontend
mnpatil17 Feb 10, 2015
04441a7
Minor command line functionality bug fix.
mnpatil17 Feb 10, 2015
851a2e5
modified cache clearing
pyprogrammer Feb 11, 2015
e9227e3
fixed caching flags
pyprogrammer Feb 11, 2015
5567d4a
updated to py3.4
pyprogrammer Feb 11, 2015
8398177
debugging
pyprogrammer Feb 11, 2015
e092fd4
I think I fixed it
pyprogrammer Feb 12, 2015
03ceeae
Merge in tuning support
leonardt Feb 15, 2015
b4f609f
Bump version for 0.1.0 release
leonardt Feb 15, 2015
dbc2ee9
Update .travis.yml for new dependencies
leonardt Feb 15, 2015
57556e4
Upgrade build to miniconda3
leonardt Feb 15, 2015
ab29a47
Fix dependency install issues
leonardt Feb 15, 2015
f471a04
Fix conda step
leonardt Feb 15, 2015
9da4e1d
install gcc-4.8
leonardt Feb 15, 2015
f489d57
Skip doc build for now
leonardt Feb 15, 2015
9db2154
Remove deprecated doc modules
leonardt Feb 15, 2015
dfaa89d
Adding documentation badge
leonardt Feb 15, 2015
8fc6b6d
Fix opentuner dependencies
leonardt Feb 15, 2015
25f8c52
revert sqlite change
leonardt Feb 15, 2015
a190b81
remove hard fglrx dependency
leonardt Feb 15, 2015
d6b49ef
skip opentuner for python3
leonardt Feb 15, 2015
4721aa7
Add requirements.txt
leonardt Feb 15, 2015
75b159d
Revert fglrx dependency
leonardt Feb 15, 2015
d3e9d4e
remove deprecated opentuner thread
leonardt Feb 15, 2015
1306407
no cover on dotgen
leonardt Feb 15, 2015
e13ee30
don't nosetests twice
leonardt Feb 15, 2015
5f33bfe
Resolved UnaryOp errors in python 3.4 by implementing visit_UnaryOp i…
mnpatil17 Feb 15, 2015
5bd465c
Merge pull request #44 from ucb-sejits/py3-fixes
mnpatil17 Feb 16, 2015
fd65f95
Remove llvmlite dependency
leonardt Feb 17, 2015
9f860db
Remove dangling llvmlite dependency.
leonardt Feb 17, 2015
3f37f92
Remove dependencies from travis.
leonardt Feb 17, 2015
092d2f3
Update readme.
leonardt Feb 17, 2015
d21b518
Add quick install step.
leonardt Feb 17, 2015
fc0f77e
install opencl
leonardt Feb 17, 2015
213e642
Don't ignore readme
leonardt Feb 17, 2015
03fa854
Install coverage and nose.
leonardt Feb 17, 2015
e33be23
Use time instead of cfg
leonardt Feb 17, 2015
b0a8164
use gcc as default compiler
leonardt Feb 17, 2015
9bd0c63
use -fPIC by default
leonardt Feb 17, 2015
2050cbf
Add LDFLAGS option
leonardt Feb 17, 2015
2a060b7
Update options compile
leonardt Feb 17, 2015
f177e8b
Quiet install step
leonardt Feb 17, 2015
d37cb0b
Merge branch 'development' into release/0.1.0
leonardt Feb 17, 2015
ed26961
Merge branch 'release/0.1.0'
leonardt Feb 17, 2015
1946a42
Merge tag '0.1.0' into development
leonardt Feb 17, 2015
09ea4cb
use post hook for readthedocs
leonardt Feb 17, 2015
ca0512d
Comment out print statements
leonardt Feb 17, 2015
8929574
Merge branch 'hotfix/remove-prints'
leonardt Feb 17, 2015
804d1ed
Bump version for hotfix
leonardt Feb 17, 2015
5ccfb28
Merge tag 'remove-prints' into development
leonardt Feb 17, 2015
d909357
Use a hashed filename to overcome filename toolong
leonardt Feb 17, 2015
f258ed1
Bump version for hotfix
leonardt Feb 17, 2015
3d4bbfb
Merge branch 'hotfix/fix-caching'
leonardt Feb 17, 2015
43b7d95
Merge tag 'fix-caching' into development
leonardt Feb 17, 2015
4b46da6
Remove print statement
leonardt Feb 17, 2015
720bedc
Bump version for release
leonardt Feb 17, 2015
e6bd757
Merge branch 'release/0.1.3'
leonardt Feb 17, 2015
98bb397
Merge tag '0.1.3' into development
leonardt Feb 17, 2015
01e4382
Ignore venv, disable highlighting
leonardt Feb 18, 2015
ca1c6ee
Added parenthesis to ensure that shell commands work for ctree
mnpatil17 Feb 23, 2015
d746750
Add support for kwargs, multiple compare, fix symbolref dotgen
leonardt Feb 24, 2015
3ee8fac
Merge branches 'development' and 'development' of github.com:ucb-seji…
leonardt Feb 24, 2015
ab0fba3
Fix dotgen for ndpointer
leonardt Feb 24, 2015
0243318
Remove unneeded import
leonardt Feb 24, 2015
bf87d7a
Remove unneeded print statement.
leonardt Feb 24, 2015
1f5e4f1
Fix comparator logic, add boolop support
leonardt Feb 25, 2015
6860303
Fix type inference in DeclarationFiller, cleanup transforms file
leonardt Feb 25, 2015
205f1d9
Fix type inference for BinaryOps
leonardt Feb 25, 2015
2042230
Check for env before lookup
leonardt Feb 25, 2015
f2bdf98
Cleanup some logging
leonardt Feb 25, 2015
36c0247
Bump version for release
leonardt Feb 25, 2015
7db3224
Merge branch 'release/0.1.4'
leonardt Feb 25, 2015
8d5d19b
Merge tag '0.1.4' into development
leonardt Feb 25, 2015
ade58a1
Add support for constant folding
leonardt Feb 26, 2015
568083f
Add more tests for constant folding
leonardt Feb 26, 2015
78e6002
Ignore sublime files
leonardt Feb 26, 2015
b94cfa0
More constant folding tests
leonardt Feb 26, 2015
9b9a517
Bump version for release
leonardt Feb 26, 2015
9f23f94
Merge branch 'release/0.1.5'
leonardt Feb 26, 2015
8916ec7
Merge tag '0.1.5' into development
leonardt Feb 26, 2015
910428e
Add module to setup.py
leonardt Feb 27, 2015
e48481f
Merge branch 'hotfix/add-module'
leonardt Feb 27, 2015
eb18220
Merge tag 'add-module' into development
leonardt Feb 27, 2015
46f9d49
Don't blow up on range nodes with weird types
leonardt Feb 27, 2015
db787d4
Bump version for release
leonardt Feb 27, 2015
935729e
Merge branch 'release/0.1.7'
leonardt Feb 27, 2015
d3dc334
Merge tag '0.1.7' into development
leonardt Feb 27, 2015
4e0861b
Still visit loop body on failure, remove Expr nodes
leonardt Feb 27, 2015
ba913ec
Cleanup jit file
leonardt Mar 1, 2015
a7edd7f
Add ability to disable cache programmatically, fix pybasicconversions…
leonardt Mar 2, 2015
60971cb
Add support for loop pragmas
leonardt Mar 2, 2015
e51e404
Import ctree.np by default so the type recognizers are registered.
leonardt Mar 3, 2015
afb0244
added Hex, need better ArrayDef
pyprogrammer Mar 3, 2015
7e3bd25
Merge branch 'development' of https://github.com/ucb-sejits/ctree int…
pyprogrammer Mar 3, 2015
a884c07
arraydef bodies should be arrays, not python lists
pyprogrammer Mar 4, 2015
67a64d8
Add support for fmin, fmax in declaration filler.
leonardt Mar 4, 2015
cbb7461
made type optional on array
pyprogrammer Mar 4, 2015
419a517
Merge branch 'development' of https://github.com/ucb-sejits/ctree int…
pyprogrammer Mar 4, 2015
bde1926
Clean up tests
leonardt Mar 4, 2015
2e225ff
Move declaration filler
leonardt Mar 4, 2015
7f5d51c
Declaration filler test
leonardt Mar 4, 2015
823ba14
Add more declaration filler tests
leonardt Mar 4, 2015
ce8d1fd
assert that the type passed to SymbolRef constructor is in fact a type
chick Mar 4, 2015
e3e11e5
added documentation to Multinode, made it a blck
pyprogrammer Mar 12, 2015
76a3f43
Support 32bit python and systems without OpenCL
leonardt Mar 13, 2015
e154cec
Add platform checks for 32-bit/64-bit differences
leonardt Mar 13, 2015
e1b12ce
Only except an import error for pycl
leonardt Mar 13, 2015
e4588cf
Add more tests for pybasic conversions
leonardt Mar 13, 2015
622d910
Bump version for release
leonardt Mar 13, 2015
d08b0c4
Merge branch 'release/0.1.8'
leonardt Mar 13, 2015
70b798d
Merge tag '0.1.8' into development
leonardt Mar 13, 2015
b0909b2
Remove pycl requires
leonardt Mar 13, 2015
b1a7484
Bump version for hotfix
leonardt Mar 13, 2015
74b69b4
Merge branch 'hotfix/0.1.9'
leonardt Mar 13, 2015
571fa16
Merge tag '0.1.9' into development
leonardt Mar 13, 2015
0f3284b
Add note about pycl in readme
leonardt Mar 13, 2015
ad6eb38
Install pycl for travis
leonardt Mar 13, 2015
9a1a9de
added - to forbidden chars
pyprogrammer Mar 15, 2015
818abea
Merge branch 'development' of https://github.com/ucb-sejits/ctree int…
pyprogrammer Mar 15, 2015
b4b02a6
added function annotations
pyprogrammer Mar 15, 2015
961697f
Remove march native from default flags
leonardt Mar 16, 2015
e3485a7
Fix bug when body is empty_list
leonardt Mar 16, 2015
ae0e8c7
Fix bug in body handling
leonardt Mar 16, 2015
5c65b4c
Just str an ast node during gen block instead of exception
leonardt Mar 16, 2015
43f7b2c
argument handling keeps moving forward, handles lookup table stuff be…
chick Mar 16, 2015
5f0939f
Merge branch 'development' of https://github.com/ucb-sejits/ctree int…
chick Mar 16, 2015
7f76a60
added suffixes, and changed NotImplemented from Exception to Error, s…
pyprogrammer Mar 17, 2015
7be919e
partially fixed jitmodule
pyprogrammer Mar 17, 2015
b5c5853
Add numpy type recognizers
leonardt Mar 18, 2015
b653d3f
fix bug that "ctree -cc" did not clear cache when cache path was abso…
chick Mar 24, 2015
5576433
Update simd types support
leonardt Mar 30, 2015
b5a698b
Merge branch 'development' of https://github.com/ucb-sejits/ctree int…
pyprogrammer Apr 17, 2015
e04f5a2
added attribute
pyprogrammer May 26, 2015
cd9e029
added attributes, Pragma
pyprogrammer May 28, 2015
d8e71a5
overall improvements, added types to pathing
pyprogrammer Jun 9, 2015
052aa6f
fixed compilation dir problem
pyprogrammer Jun 9, 2015
6875a92
replaced None with '' since hash(None) changes across runs
pyprogrammer Jun 13, 2015
0716207
there was something weird about name stripping.
pyprogrammer Jun 24, 2015
96b816e
fixed some hashing problems that were taking forever
pyprogrammer Jul 6, 2015
aa87663
optimized hashing
pyprogrammer Jul 13, 2015
ddbe869
forgot about python __ semantics
pyprogrammer Jul 13, 2015
42c4651
uses single Assign node instead of MultiNode if single assignment
dorthyluu Jul 15, 2015
855c0c4
uses single Assign node instead of MultiNode if single assignment
dorthyluu Jul 15, 2015
358a088
uses single Assign node instead of MultiNode if single assignment
dorthyluu Jul 15, 2015
dbf189a
single Assign node if single assignment, not MultiNode
dorthyluu Jul 15, 2015
7811932
reverting to MultiNode for Assign
dorthyluu Jul 15, 2015
8b00615
reverting to MultiNode for Assign
dorthyluu Jul 15, 2015
9bff837
added cogenerator injection to ctree
pyprogrammer Jul 16, 2015
fb05937
Merge branch 'Rebox' of https://github.com/ucb-sejits/ctree into Rebox
pyprogrammer Jul 16, 2015
e370388
Revert "added cogenerator injection to ctree"
pyprogrammer Jul 16, 2015
e79e6fd
made it easier to include pre-defined cfuncs
pyprogrammer Jul 16, 2015
fa2b6e8
added tests for python unary op
dorthyluu Jul 20, 2015
a373980
added tests
pyprogrammer Jul 20, 2015
4928f8f
Merge branch 'Rebox' of https://github.com/ucb-sejits/ctree into Rebox
dorthyluu Jul 20, 2015
9e8a3ab
added restrict
pyprogrammer Jul 20, 2015
68647be
Merge branch 'Rebox' of https://github.com/ucb-sejits/ctree into Rebox
pyprogrammer Jul 20, 2015
6337367
added test for multiple comparison
dorthyluu Jul 20, 2015
c91bf4c
Merge branch 'Rebox' of https://github.com/ucb-sejits/ctree into Rebox
dorthyluu Jul 20, 2015
e9fa003
test for python list
dorthyluu Jul 20, 2015
2554ee0
improved unary op test
dorthyluu Jul 20, 2015
28c4ce3
Adding verification for ArrayRef and Dot
hsadok Jul 31, 2015
9d7f34f
Checking None
hsadok Aug 1, 2015
15ea8d0
Adding tests
hsadok Aug 1, 2015
5c23dba
Removing "dot if" and check if _type_ is callable
hsadok Aug 3, 2015
9d911c7
Improving test for Dot
hsadok Aug 3, 2015
b1ab842
Removing unnecessary ____temp__
hsadok Aug 3, 2015
6b6bf60
added for loop decl filler
pyprogrammer Aug 25, 2015
245c97b
modified declaration filler
pyprogrammer Sep 11, 2015
e1af98c
Initial implementation of hwacha code generator example
leonardt Sep 23, 2015
1ad8aa8
Update get_type interface, fix test for single assignment case
leonardt Sep 23, 2015
f8c6861
Generate code using map for implicit vectorization
leonardt Sep 25, 2015
1cc33da
Use hwacha_map and int32g
leonardt Sep 25, 2015
a615af6
use list(map for py3
leonardt Sep 25, 2015
1d6fe44
Generate vector assembly
leonardt Sep 25, 2015
0abbd8d
Updated dgemm example for autotuning showcasing
dorthyluu Sep 26, 2015
3efdbab
Merge remote-tracking branch 'origin/development'
leonardt Sep 28, 2015
c0561c2
added requirements comment
dorthyluu Sep 28, 2015
1a3199b
Merge branch 'Rebox'
chick Oct 7, 2015
bb4e7ac
Fixed test of omp end to end by adding clamp macro to the omp Functio…
chick Oct 13, 2015
f3db593
artifact of trying to get test_examples to work
chick Oct 13, 2015
5f861b8
Add more simd types, some python3 bugfixes
leonardt May 6, 2016
0688ca3
Remove fglrx version
leonardt May 6, 2016
77392ed
Install opencl manually
leonardt May 9, 2016
1c991ca
Add amd sdk setup script
leonardt May 9, 2016
a0fd1b5
Set pycl env variable
leonardt May 9, 2016
99cd8ec
check that cache directory exists before removing it.
chick Nov 14, 2016
27f480f
Merge pull request #50 from ucb-sejits/fix-clear-cache-error
chick Feb 1, 2017
52ee7b1
update tests
mbdriscoll Jun 13, 2017
47a100a
update path to libOpenCL on Travis
mbdriscoll Jun 14, 2017
de0d825
attempt 2: install opencl into /usr
mbdriscoll Jun 14, 2017
9397acb
attempt 3: use sudo
mbdriscoll Jun 14, 2017
f2101c9
attempt 4: path to libOpenCL
mbdriscoll Jun 14, 2017
f8a6745
attempt 5: spell SDK correctly
mbdriscoll Jun 14, 2017
834b966
update coverage requirement
mbdriscoll Jun 14, 2017
0f9383d
update travis build script
mbdriscoll Jun 14, 2017
7fb6c7e
Merge pull request #52 from ucb-sejits/fixocl
mbdriscoll Jun 14, 2017
30e5992
Merge pull request #48 from ucb-sejits/feature/array_and_dot_type
chick Jul 6, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ omit =
*/python?.?/*
*/site-packages/nose/*
*/opentuner/opentuner/*
*/test/*
*/ctree/tools/*
*/ctree/visual/*
*/ctree/metrics/*
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# C extensions
*.so
*.o

# Packages
*.egg
Expand Down Expand Up @@ -37,6 +38,7 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject
.idea

# vim temp files
.*.swp
Expand All @@ -52,7 +54,17 @@ htmlcov

# virtualenv subdirs
venv-*
.venv

# opentuner stuff
opentuner.db
opentuner.log

# rope library
.ropeproject

# compiled files
compiled/*

*.sublime-project
*.sublime-workspace
28 changes: 28 additions & 0 deletions .travis.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[jit]
COMPILE_PATH = ./compiled
CACHE = False

[c]
CC = gcc
CFLAGS = -fPIC -O2 -std=c99
LDFLAGS =

[omp]
CC = gcc
CFLAGS = -fPIC -std=c99 -O2 -I/opt/intel/composerxe/include -fopenmp
LDFLAGS =

[opencl]
CC = gcc
CFLAGS = -fPIC -std=c99 -O2
# For Linux
LDFLAGS = -L/home/travis/AMDAPPSDK/lib/x86_64 -lOpenCL

[log]
# maximum number of lines to show when programs are printed to the log
max_lines_per_source = 10
pygments_style = vim

[opentuner]
args = --quiet --no-dups
timeout = 3
116 changes: 40 additions & 76 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,54 @@
cache:
- apt
- pip
language: python

python:
- "2.7"
- "3.2"
- "3.3"

- '2.7'
- '3.4'
env:
global:
# encrypted OAuth token so Travis can commit docs back to Github
- secure: "QBB2KT4EFUdSkH9fjo5J/02zuZlD0FbVsKwYJgW6c4INp1UY/nx0nrsgjPSZQMD2HBztdfEZInugoVrOJwXBzWJ5Ioc19T9oYhnzaIF6oJRo1mTYDhragvdwiLfb0AyylGq7bgP4lgoMBtE1Oxauf0rKVEYiVeEhvHJup/di6A4="
matrix:
- LLVM_VERSION=3.3

- secure: QBB2KT4EFUdSkH9fjo5J/02zuZlD0FbVsKwYJgW6c4INp1UY/nx0nrsgjPSZQMD2HBztdfEZInugoVrOJwXBzWJ5Ioc19T9oYhnzaIF6oJRo1mTYDhragvdwiLfb0AyylGq7bgP4lgoMBtE1Oxauf0rKVEYiVeEhvHJup/di6A4=
before_install:

- sudo apt-get update -qq
- sudo apt-get install -qq llvm-$LLVM_VERSION


- if [ $TRAVIS_OS_NAME = "linux" ]; then
bash .travis/amd_sdk.sh;
tar -xjf AMD-SDK.tar.bz2;
AMDAPPSDK=${HOME}/AMDAPPSDK;
export OPENCL_VENDOR_PATH=${AMDAPPSDK}/etc/OpenCL/vendors;
mkdir -p ${OPENCL_VENDOR_PATH};
sh AMD-APP-SDK*.sh --tar -xf -C ${AMDAPPSDK};
echo libamdocl64.so > ${OPENCL_VENDOR_PATH}/amdocl64.icd;
export PYCL_OPENCL=${AMDAPPSDK}/lib/x86_64/libOpenCL.so;
export LD_LIBRARY_PATH=${AMDAPPSDK}/lib/x86_64:${LD_LIBRARY_PATH};
chmod +x ${AMDAPPSDK}/bin/x86_64/clinfo;
${AMDAPPSDK}/bin/x86_64/clinfo;
find ${AMDAPPSDK} -name libOpenCL*;
fi;
- sudo apt-get install -qq opencl-headers
install:
# make 'x.y' version string
- export PYTHON_VERSION=$(python -c 'import sys; print(sys.version_info[0:2])')

# coverage and doc generator
- pip install numpy Sphinx coveralls coverage nose pygments
- pip install -r requirements.txt
- if [ $PY_MAJOR_MINOR \< "3.0" ]; then pip install opentuner; fi
- pip install coverage nose pycl
- cp .travis.cfg ctree/defaults.cfg
- nosetests --version
- coverage --version

# install llvmpy
- git clone git://github.com/llvmpy/llvmpy.git ${HOME}/llvmpy
- cd ${HOME}/llvmpy
- LLVM_CONFIG_PATH=/usr/bin/llvm-config-$LLVM_VERSION python setup.py install

# install opentuner
- git clone https://github.com/mbdriscoll/opentuner.git ${HOME}/opentuner
- cd ${HOME}/opentuner
- sudo apt-get install `cat debian-packages-deps | tr '\n' ' '`
- "if [[ \"x$PYTHON_VERSION\" -eq \"x(2.7)\" ]]; then pip install -r python-packages; fi"
- export PYTHONPATH=`pwd`:$PYTHONPATH

# install ctree via setup.py
- cd ${TRAVIS_BUILD_DIR}
- python setup.py install

- env
script:

# run test suite from home directory to verify installation
- cd ${HOME}
- nosetests --where=${TRAVIS_BUILD_DIR}/test

# run test suite again from build dir to get coverage info
- cd ${TRAVIS_BUILD_DIR}
- nosetests --verbose --with-coverage --cover-package=ctree --cover-min-percentage=90 --cover-erase


- nosetests --verbose --with-coverage --cover-package=ctree --cover-min-percentage=87
--cover-erase
after_success:

# return early if not building ucb-sejits/ctree
- "if [[ \"x${TRAVIS_REPO_SLUG}\" != 'xucb-sejits/ctree' ]]; then echo 'skipping coveralls/sphinx for non ucb-sejits/ctree builds.'; exit 0; fi"

# only build docs using Python 2.7
- "if [[ \"x$PYTHON_VERSION\" != \"x(2, 7)\" ]]; then echo 'Not Python 2.7; skipping doc build.'; exit 0; fi"

# publish coverage report
- coveralls

# build documentation
- make -C doc html

# merge documentation
- git clone "https://github.com/ucb-sejits/ctree-docs.git" ${HOME}/ctree-docs
- cd ${HOME}/ctree-docs
- git fetch origin gh-pages
- git checkout gh-pages
- rsync -a ${TRAVIS_BUILD_DIR}/doc/_build/html/ ./
- git add .
- git status

# commit documentation
- git config --global user.name 'Ctree Doc Bot'
- git config --global user.email 'mbdriscoll+ctreeoauth@gmail.com'
- git commit -m "Updating documentation from Travis Build ${TRAVIS_BUILD_ID}."

# set up oauth for push
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GH_TOKEN}:x-oauth-basic@github.com" > .git/credentials

# commit new docs to ctree-docs
- git push origin gh-pages
- curl -X POST http://readthedocs.org/build/ctree
notifications:
slack: ucb-sejits:cPZxBunxagWZ763mcsIXOV0W
deploy:
provider: pypi
user: leonardt
password:
secure: SMiyQflUvfG0M8bR07Sri8VXnPSFKprNxA3RF7sljk99Aj9BuuuBRLkcOhkYtIRYfgHUSEnFeYYe+rb8y6BV/LnulCQiw9bCIqmPY9IYGy63DNjUGxh65MyO9HDjwz4hi+4endwZTXaUL3X4de9Xk3NnDhHISiLd7WymR9YQ7eE=
on:
tags: true
all_branches: true
repo: ucb-sejits/ctree
38 changes: 38 additions & 0 deletions .travis/amd_sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# Original script from https://github.com/gregvw/amd_sdk/

# Location from which get nonce and file name from
URL="http://developer.amd.com/tools-and-sdks/opencl-zone/opencl-tools-sdks/amd-accelerated-parallel-processing-app-sdk/"
URLDOWN="http://developer.amd.com/amd-license-agreement-appsdk/"

NONCE1_STRING='name="amd_developer_central_downloads_page_nonce"'
FILE_STRING='name="f"'
POSTID_STRING='name="post_id"'
NONCE2_STRING='name="amd_developer_central_nonce"'

#For newest FORM=`wget -qO - $URL | sed -n '/download-2/,/64-bit/p'`
FORM=`wget -qO - $URL | sed -n '/download-5/,/64-bit/p'`

# Get nonce from form
NONCE1=`echo $FORM | awk -F ${NONCE1_STRING} '{print $2}'`
NONCE1=`echo $NONCE1 | awk -F'"' '{print $2}'`
echo $NONCE1

# get the postid
POSTID=`echo $FORM | awk -F ${POSTID_STRING} '{print $2}'`
POSTID=`echo $POSTID | awk -F'"' '{print $2}'`
echo $POSTID

# get file name
FILE=`echo $FORM | awk -F ${FILE_STRING} '{print $2}'`
FILE=`echo $FILE | awk -F'"' '{print $2}'`
echo $FILE

FORM=`wget -qO - $URLDOWN --post-data "amd_developer_central_downloads_page_nonce=${NONCE1}&f=${FILE}&post_id=${POSTID}"`

NONCE2=`echo $FORM | awk -F ${NONCE2_STRING} '{print $2}'`
NONCE2=`echo $NONCE2 | awk -F'"' '{print $2}'`
echo $NONCE2

wget --content-disposition --trust-server-names $URLDOWN --post-data "amd_developer_central_nonce=${NONCE2}&f=${FILE}" -O AMD-SDK.tar.bz2;
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,18 @@ See the [website](http://ucb-sejits.github.io/ctree/) or [documentation](https:/

[![Build Status](https://travis-ci.org/ucb-sejits/ctree.png?branch=master)](https://travis-ci.org/ucb-sejits/ctree)
[![Coverage Status](https://coveralls.io/repos/ucb-sejits/ctree/badge.png)](https://coveralls.io/r/ucb-sejits/ctree)
[![Documentation Status](https://readthedocs.org/projects/ctree/badge/?version=latest)](https://readthedocs.org/projects/ctree/?badge=latest)

Quick Install
-------------
```shell
pip install ctree
```
For OpenCL support, install the pycl package.
```shell
pip install pycl
```

Development
-----------
[See the wiki](https://github.com/ucb-sejits/ctree/wiki)
53 changes: 48 additions & 5 deletions ctree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""
from __future__ import print_function



# ---------------------------------------------------------------------------
# explicit version check

Expand Down Expand Up @@ -54,11 +56,15 @@
else:
from io import StringIO as Memfile

from ctree.util import highlight

CONFIGFILE = Memfile()
CONFIG.write(CONFIGFILE)
CONFIG_TXT = CONFIGFILE.getvalue()
LOG.info("using configuration:\n%s", CONFIG_TXT)
LOG.info("using configuration:\n%s", highlight(CONFIG_TXT, language='ini'))
CONFIGFILE.close()
if CONFIG.has_option('log','level'):
logging.basicConfig(level=getattr(logging,CONFIG.get('log','level')))


# ---------------------------------------------------------------------------
Expand All @@ -68,7 +74,7 @@
import collections


class Counter(object):
class LogInfo(object):
"""Tracks events, reports counts upon garbage collections."""

def __init__(self):
Expand All @@ -86,9 +92,44 @@ def report(self):
LOG.info("execution statistics: (((\n%s)))", key_values_string)


STATS = Counter()
STATS = LogInfo()
atexit.register(STATS.report)

#----------------------------------------------------------------------------
#Temporary directory stuff
import tempfile
import shutil
import os.path

if CONFIG.getboolean('jit', 'CACHE'):
STATS.log("recognized that caching is enabled")
else:
STATS.log("recognized that caching is disabled")

if not CONFIG.getboolean('jit', 'CACHE'):
compile_path_old = CONFIG.get('jit', 'COMPILE_PATH')
temporary_path = tempfile.mkdtemp()
CONFIG.set('jit', 'COMPILE_PATH', temporary_path)

def reset():
CONFIG.set('jit', 'COMPILE_PATH', compile_path_old)
if(os.path.isdir(temporary_path)):
shutil.rmtree(temporary_path)

atexit.register(reset)

# Registries for type-based logic in extension packages.
_TYPE_CODEGENERATORS = {}
_TYPE_RECOGNIZERS = {}

OCL_ENABLED = True
try:
import pycl
except ImportError:
OCL_ENABLED = False

import ctree.np

import ast
import inspect
import ctree.frontend
Expand All @@ -106,13 +147,15 @@ def ipython_show_ast(tree):
converts tree in place to a dot format
then renders that into a png file
"""
import ctree.dotgen
return DotManager.dot_ast_to_image(tree)


def browser_show_ast(tree, file_name):
def browser_show_ast(tree, file_name=None):
"""
convenience method to display an AST in ipython
converts tree in place to a dot format
then renders that into a png file
"""
return DotManager.dot_ast_to_browser(tree, file_name)
import ctree.dotgen
return DotManager.dot_ast_to_browser(tree, file_name)
20 changes: 0 additions & 20 deletions ctree/analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,3 @@ def visit(self, node):
if not isinstance(node, CtreeNode):
raise AstValidationError("Expected a pure C ast, but found a non-CtreeNode: %s." % node)
self.generic_visit(node)


class VerifyParentPointers(NodeVisitor):
"""
Checks that parent pointers are set correctly, and throws
an AstValidationError if they're not.
"""

def _check(self, child, parent):
"""throw if child.parent is not the actual parent"""
if child.parent != parent:
raise AstValidationError("Expect parent of %s to be %s, but got %s instead." %
(type(child), type(parent), type(child.parent)))

def generic_visit(self, node):
for _, value in ast.iter_fields(node):
for child in flatten(value):
if isinstance(child, ast.AST):
self._check(child, node)
self.visit(child)
Loading