Tractables / ProbabilisticCircuits.jl

Probabilistic Circuits from the Juice library
https://tractables.github.io/ProbabilisticCircuits.jl/dev
Apache License 2.0
104 stars 11 forks source link

Cuda MAP/Sample on new bit circuits #116

Closed khosravipasha closed 2 years ago

khosravipasha commented 2 years ago
  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:

codecov[bot] commented 2 years ago

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%) :arrow_down:
src/queries/likelihood.jl 2.18% <0.00%> (-0.04%) :arrow_down:
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%) :arrow_down:
src/bits_circuit.jl 87.70% <77.77%> (-0.64%) :arrow_down:
src/queries/sample_cpu.jl 100.00% <100.00%> (+100.00%) :arrow_up:
src/queries/likelihood_cpu.jl 58.33% <0.00%> (-1.29%) :arrow_down:

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.