Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install nvidia-opencl-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wifi | |
sudo apt-get install bcmwl-kernel-source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you get the error: | |
# The following packages have unmet dependencies: | |
# mpv : Depends: libva-x11-1 (>= 1.0.3) but it is not going to be installed | |
# E: Unable to correct problems, you have held broken packages. | |
# Workaround: | |
sudo aptitude install mpv | |
# Accept this solution? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intel® Core™ i7-7567U CPU @ 3.50GHz × 4 | |
Intel® Iris Plus Graphics 650 (Kaby Lake GT3e) | |
Number of platforms 2 | |
Platform Name Intel(R) OpenCL | |
Platform Vendor Intel(R) Corporation | |
Platform Version OpenCL 2.0 | |
Platform Profile FULL_PROFILE | |
Platform Extensions cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MacBookPro14,2: MacBookPro 13 Retina with Touchbar | |
Model A1706 EMC 3163 | |
Serial C02v8055HV2V | |
no keyboard | |
no touch pad | |
no touch bar | |
no wifi (bad signal) | |
cb22/macbook12-spi-drivers ("applespi") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get OpenCL driver automated installer (installs kernel 4.7) | |
curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh | |
chmod +x install_OCL_driver.sh | |
# install OpenCL driver | |
sudo ./install_OCL_driver.sh install | |
# check | |
ls /boot/vmlinuz-*intel* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_params(params): | |
# update params if user said 'auto', otherwise take user specified value | |
# a first try at reusing for all params the same code for that logic | |
for param_key, param_value in params.items(): | |
actual_key = 'actual_' + param_key | |
# Is this a param that has a user mode? | |
has_user_mode = actual_key in params | |
if has_user_mode: | |
if param_value is 'user-forced': | |
# we could even do more checks here, maybe param-specific |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import numpy as np | |
from numpy.fft import fftn as npfftn | |
from numpy.testing import assert_array_almost_equal | |
import pyopencl as cl | |
import pyopencl.array | |
from reikna import cluda | |
from reikna.fft import FFT as reikna_FFT | |
# Select device |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Implementation of count (in Julia v0.3) | |
# Christophe MEYER 2015 | |
# count the number of times v appears in the sorted vector A | |
function count(A, v) | |
assert(issorted(A)) | |
lower = findbound(A, v, :lower) | |
upper = findbound(A, v, :upper) | |
found = lower > 0 && upper > 0 | |
if found |