8000 Only trigger tag replacement in nested calls (suggested by GJS) by sritchie · Pull Request #252 · sicmutils/sicmutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Only trigger tag replacement in nested calls (sug 8000 gested by GJS) #252

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

Merged
merged 2 commits into from
Feb 6, 2021

Conversation

sritchie
Copy link
Member
@sritchie sritchie commented Feb 1, 2021

This PR adds an *active-tags* stack that allows us to save work in the case of a nested derivative. *active-tags* is a stack containing the tags of all nested calls; in #226 , this is going to save us trouble when deciding whether a TapeCell should wrap a Differential or vice versa if both show up in a computation.

@codecov-io
8000
Copy link

Codecov Report

Merging #252 (383f692) into master (dc83f1a) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
- Coverage   84.19%   84.16%   -0.03%     
==========================================
  Files          81       81              
  Lines        8375     8405      +30     
  Branches      453      455       +2     
==========================================
+ Hits         7051     7074      +23     
- Misses        871      876       +5     
- Partials      453      455       +2     
Impacted Files Coverage Δ
src/sicmutils/calculus/derivative.cljc 86.06% <100.00%> (+0.72%) ⬆️
src/sicmutils/differential.cljc 91.07% <100.00%> (-0.38%) ⬇️
src/sicmutils/collection.cljc 84.90% <0.00%> (-1.89%) ⬇️
src/sicmutils/numsymb.cljc 93.63% <0.00%> (-0.64%) ⬇️
src/sicmutils/structure.cljc 85.66% <0.00%> (-0.32%) ⬇️
src/sicmutils/env/sci.cljc 95.00% <0.00%> (+0.08%) ⬆️
src/sicmutils/abstract/function.cljc 81.87% <0.00%> (+0.75%) ⬆️
src/sicmutils/value.cljc 82.88% <0.00%> (+0.90%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc83f1a...383f692. Read the comment docs.

(fn [x]
(let [tag (d/fresh-tag)
lifted (d/bundle-element x 1 tag)]
(-> (d/with-active-tag tag f [lifted])
Copy link
Member Author

Choose a reason for hiding this comment

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

this is going to help us decide WHICH tag is currently in play, when we go to implement reverse-mode and need to distinguish tape from differential... more on that in #226 .

@sritchie sritchie merged commit 0cedae0 into master Feb 6, 2021
@sritchie sritchie deleted the sritchie/savings branch February 6, 2021 01:47
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.

3 participants
0