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

Cuda MAP/Sample on new bit circuits #116

Merged
merged 33 commits into from
Mar 7, 2022
Merged

Cuda MAP/Sample on new bit circuits #116

merged 33 commits into from
Mar 7, 2022

Conversation

khosravipasha
Copy link
Contributor

@khosravipasha khosravipasha commented Feb 23, 2022

  1. Adds to bitrcuit the begining and end of edge ids for each node.
  2. Make upward customizable with functions for input_init_func and sum_agg_func. Since we initialize input nodes and handle sum nodes differently for MAP
  3. Downward pass for MAP (preprocess map state and map-lls for each input on the bpc.heap, then use parallel stacks to keep track of choices until input nodes)

Todos:

  • Adding tests
  • Tests comparing cpu and gpu versions
  • Test on hybrid input types to see if kernels still compile
  • Somehow add tests for sample (maybe with a fixed random seed)

@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #116 (7d3fb13) into master (c98b568) will decrease coverage by 5.38%.
The diff coverage is 4.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
- Coverage   47.84%   42.46%   -5.39%     
==========================================
  Files          18       20       +2     
  Lines        1417     1731     +314     
==========================================
+ Hits          678      735      +57     
- Misses        739      996     +257     
Impacted Files Coverage Δ
src/abstract_nodes.jl 87.75% <0.00%> (-1.83%) ⬇️
src/queries/likelihood.jl 2.18% <0.00%> (-0.04%) ⬇️
src/queries/map.jl 0.00% <0.00%> (ø)
src/queries/sample.jl 0.00% <0.00%> (ø)
src/structures/rat.jl 0.00% <0.00%> (ø)
src/input_distributions.jl 29.46% <4.25%> (-18.30%) ⬇️
src/bits_circuit.jl 87.70% <77.77%> (-0.64%) ⬇️
src/queries/sample_cpu.jl 100.00% <100.00%> (+100.00%) ⬆️
src/queries/likelihood_cpu.jl 58.33% <0.00%> (-1.29%) ⬇️

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 c98b568...7d3fb13. Read the comment docs.

@khosravipasha khosravipasha changed the title [WIP] Cuda MAP on new bit circuits Cuda MAP on new bit circuits Feb 25, 2022
@khosravipasha khosravipasha changed the title Cuda MAP on new bit circuits Cuda MAP/Sample on new bit circuits Feb 26, 2022
@khosravipasha khosravipasha self-assigned this Feb 26, 2022
@khosravipasha khosravipasha added this to the Version 0.4 milestone Feb 26, 2022
@khosravipasha khosravipasha merged commit 5437fae into master Mar 7, 2022
@khosravipasha khosravipasha deleted the cudamap branch March 8, 2022 02:13
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