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

Gpu refactor #96

Merged
merged 15 commits into from
Nov 4, 2021
Merged

Gpu refactor #96

merged 15 commits into from
Nov 4, 2021

Conversation

khosravipasha
Copy link
Contributor

@khosravipasha khosravipasha commented Oct 28, 2021

The tests are passing (both on github actions and on gpu)

Breaking Changes:

  1. Removal of use_gpu, if want a query to be run on gpu then need to move the data to gpu first. Now juice decides between where to run based on where the data is. This avoids accidently moving stuff between cpu/gpu all the time.

  2. Removal of use_sample_weights: did not seem necessary as you can check isweighted(data) (already done in the code logic, seemed redundant)

  3. Rename uniform_parameters to uniform_parameters! as its changing the circuit parameters.

  4. rename estimate_paramters_em to something like estimate_paramters_em!

  5. rename estimate_parameters_cached! to e update_pc_paramters_from_pbc!

  6. rename estimate_parameters to estimate_parameters!

  7. Few other renames to add ! indicating change

Non-breaking changes:

  • Use of Cuda occupancy API to know max threads possible per kernel, also new balacing code for 2d balance_threads_2d. For example, see the implementation of function marginal_layers(...
  • Some documenation
  • Move to LazyArtifacts
  • Move to Graph.jl from LightGraphs.jl
  • Simplifying the logic of each epoch (speically the extra weight related if statements)
  • Add API support for multiple epoch training in juice estimate_parameters_em_multi_epochs!

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #96 (a391746) into master (31a2d33) will decrease coverage by 1.69%.
The diff coverage is 49.75%.

❗ Current head a391746 differs from pull request most recent head 8faf902. Consider uploading reports for the commit 8faf902 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
- Coverage   70.19%   68.49%   -1.70%     
==========================================
  Files          39       39              
  Lines        3214     3276      +62     
==========================================
- Hits         2256     2244      -12     
- Misses        958     1032      +74     
Impacted Files Coverage Δ
src/ProbabilisticCircuits.jl 100.00% <ø> (ø)
src/factor_graph/fg_compile.jl 56.41% <ø> (ø)
src/io/clt_io.jl 73.68% <ø> (ø)
src/io/io.jl 90.00% <ø> (ø)
src/io/plot.jl 0.00% <ø> (ø)
src/parameter_learn/param_bit_circuit.jl 93.10% <ø> (ø)
src/queries/map.jl 54.54% <0.00%> (-1.27%) ⬇️
src/queries/sample.jl 44.11% <0.00%> (-1.34%) ⬇️
src/structurelearner/chow_liu_tree.jl 100.00% <ø> (ø)
src/structurelearner/vtree_learner.jl 96.66% <ø> (ø)
... and 16 more

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 31a2d33...8faf902. Read the comment docs.

@khosravipasha khosravipasha marked this pull request as ready for review October 28, 2021 02:45
@khosravipasha khosravipasha requested a review from liuanji October 28, 2021 02:45
@khosravipasha khosravipasha linked an issue Nov 3, 2021 that may be closed by this pull request
each epoch faster, but for fastest version the paramters don't improve as fast
@khosravipasha khosravipasha merged commit 6a73734 into master Nov 4, 2021
@khosravipasha khosravipasha deleted the gpu-refactor branch November 4, 2021 04:28
@khosravipasha khosravipasha linked an issue Nov 4, 2021 that may be closed by this pull request
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.

Breaking: New version of SimpleWeightedGraphs v1.2 Remove use_gpu when data is available
1 participant