Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel2017 #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Parallel2017 #1

wants to merge 7 commits into from

Conversation

anton-malakhov
Copy link
Contributor

Code review for @fschlimb

@anton-malakhov
Copy link
Contributor Author

From a glance, this code is not compatible with few design principles we tried to follow with the SC version. To name a few:

  • files bs_erf_*.py are supposed to runnable (see run.sh) and clearly diffable (for the sake of live demo)
  • names are not consistent, in particular "framework" files like bs_erf_apply.py defines black_scholes which is rather property of the compute kernel, not "launcher"
  • global?!
  • while I like modular approach to different parallel engines, it asks for better integration with the main driver, probably specifying "run" method by argument keys (see composability benches as an example)
  • it introduces some new usage principles which are not obvious to me at this moment. But what's obvious already is that they are incompatible with existing code introducing fragmentation of approaches and usage model.
    Apparently, existing structure of the benchmark was not ready for introduction of many "run approaches", so, it needs clean design approach to be established in order to keep everything uniformly organized, easy to use, easy to read, simply diffable, modular for avoiding side-effects from one component to another..

bs_erf_naive.py Outdated
T = t [i]
P = float(price[i])
S = strike[i]
T = t[i]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces here were on purpose to make it look pretty in WinMerge reports comparing implementations

if repeat < 1:
repeat = 1
##############################################

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's changed here? EOLs?



def bs(nopt, rate, vol):
mr = -rate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need new implementation here?

bs_erf_numpy.py Outdated
sig_sig_two = vol * vol * 2
def black_scholes(nopt, price, strike, t, rate, vol):
mr = -rate
sig_sig_two = vol * vol * 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all spaces were on purpose for the diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants