This repository contains three main folders: homework, paper, and project.
This folder contains the homework solutions for 12 weeks, organized into 12 separate folders (one for each week). Each folder includes solutions to the corresponding week's tasks. The naming convention for each solution is as follows:
week_task_descriptiveName
- Files: For smaller tasks.
- Folders: For larger tasks that require multiple files.
This folder contains the paper related to the project.
The project folder contains the main project work, divided into two subfolders: final and development.
The final folder represents the final state of the project. It includes:
-
dist/:- Contains a
.whl(wheel) file that allows installation of thefast_einsumpackage on Windows machines that support AVX2 vector instructions.
Installation command:
pip install dist/fast_einsum-0.1-cp311-cp311-win_amd64.whl
Usage
- Contains a
You can use fast_einsum as follows:
import numpy as np
from fast_einsum import fast_einsum
A = np.random.rand(3, 3)
B = np.random.rand(3, 3)
C = np.einsum("ab,bc->ac", A, B)
C_tilda = fast_einsum("ab,bc->ac", A, B)
print(np.allclose(C, C_tilda))-
benchmark/:- Contains code for benchmarking the implementation of
fast_einsum.
- Contains code for benchmarking the implementation of
-
plot/:- Contains code for generating plots based on the benchmarking results for the paper.
-
fast_einsum/:- The main implementation of the
fast_einsumpackage.
- The main implementation of the
-
setup.py:- Used to build the wheel file for the
fast_einsumpackage.
- Used to build the wheel file for the
The development folder includes all development versions of the fast_einsum package.
main.py:- Benchmarks the different development versions against each other. The results of these benchmarks are presented and discussed in the paper.