Describes a wrapper for CULA (a linear algebra library using NVDIA's CUDA technology), developed by Garrett Wright and Louis Theran (under my benign guidance :)) This is a mid-2010 poster.
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Gtc 2010 py_cula_better
1. Transparent Python Bindings for CULA
http://www.math.temple.edu/research/geometry/PyCULA/
Garrett Wright and Dr. Louis Theran
Complete CULA support Confused about how to use gpu_syev? In order to sort through the enormous database
Complete PyCUDA support From Python, just type help(gpu_syev) of hypothetical structures we are implementing
Mix Kernel and Runtime code spectral analysis. Specifically we are
Help on function gpu_syev in module PyCULA.cula:
Interpreter Friendly! performing log(Det()) of an energy function
gpu_syev(A, vectors=False, uplo='U')
Combine the power of Python Modules Takes symmetric matrix as np.array and returns eigenvalues (optionally eigenvectors) weighted adjacency matrix.
as np.array.
Interfaces directly with Numpy
Keyword arguments:
Integration with PyCUDA A -- input matrix as np.array, symmetric
Having PyCULA to integrate sparse expansion
Memory Management vectors -- default == False; use 'True' to compute vectors. kernels, GPU accelerated LAPACK, and add a
uplo -- Defines whether input array has data in Upper or Lower half using 'U' or 'L'
Super Simple Syntax: respectively Pythonic interface is a priceless utility.
default=='U'
>>> from PyCULA.cula import * # Load PyCULA Note: When vectors==False, gpu_syev returns only the eigenvalues.
>>> a = numpy.array([[1.,1.],[0.,1.]]) # CreateData When vectors==True, gpu_syev returns tuple (eigenvalues,eigenvectors) from PyCULA.cula import *
>>>culaInitialize() # Initialize Device (END) from PyCULA.my_init import *
>>> print gpu_svd(a) # Perform SVD import numpy as np
[ 1.61803399 0.61803399] # Printed Results import atexit
>>>culaShutdown() # Shutdown Device import kernel_modules #import custom kernel module code
pycuda_init_once()
culaInitialize()
atexit.register(cula.culaShutdown)
# This is an adjacency list, a *condensed* form of a larger sparse adjacency
matrix.
Integrate SQL databases for your scientific E=np.array([[1 , 2 ],[ 1 , 16 ], [3 , 4 ],[ 4 , 5 ],
Data [ 6 , 7 ],[ 7 , 8 ],[ 8 , 9 ],[ 8 , 5 ],[ 9 , 10 ],
[ 9 , 4 ],[ 19 , 16 ],[ 20 , 1 ]], dtype=np.float32)
Use Scipy to read and write to MATLAB files
Simple parsing code # expand reduced form into full matrix using GPGPU kernel
M_ = kernel_modules.gpu_expand_kernel(E)
Easily execute multiple instances via
eigvals = gpu_devsyev(M_) # run CULA syevon GPU array M_
subprocess
Prototype or compute within the interpreter;
No need to manually compile!
Write a single program to code optimized
programs on the fly Atlas of Prospective Zeolite Structures
http://www.hypotheticalzeolites.net/
Easily compress and extract data with gzip
and zlib modules Many thanks to the NSF for funding our research into the
Take advantage of automatic memory This is a hypothetical zeolite structure. We computational physics of zeolites.
management; Helps write leak free code! currently have a database of over 2 million such
Simple, short, clean code helps prevent bugs! structures, yet only a few have been discovered
in nature