Skip to content

SilvestriLab/CountingTrianglePIM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CountingTrianglePIM

The code was tested using using the UPMEM SDK version 2024.1.0 both on real hardware and on the provided functional model.

Modyfing Makefile:

  • Change the number of tasklets per DPU by modifying NR_TASKLETS. The value should be a power of 2. The best performing configuration uses 16 tasklets.
  • Change the number of available DPUs by modifying NR_DPUS. The number of DPUs to use should be a valid value, calculated given the number $C$ of colors used, using the formula NR_DPUS = Binom(C+2, 3).
  • Change the number of threads used by the host processor by modifying NR_THREADS. The best configuration uses a number of threads equal to the number of threads available in the host CPU.

Execute the code:

To execute the code, it is necessary to run, inside the folder (bin) created after running make, the following command:

./app -s seed -M sample_size -p keep_percentage -k Misra_Gries_dictionary_size -t nr_most_frequent_nodes_sent -c nr_colors -f path_to_graph_file

where:

  • seed is the seed for generating random numbers. Random if not given.
  • sample_size is the size of the sample inside the DPUs. The maximum allowed value is used if not given.
  • keep_percentage is the probability of an edge being kept. No edges are ignored (keep_percentage = 1) if not given.
  • Misra_Gries_dictionary_size is the number of maximum entries in the dictionary for Misra-Gries for each thread. Misra-Gries is not used if not given.
  • nr_most_frequent_nodes_sent is the number of top frequent nodes sent to the DPUs. It is ignored if Misra-Gries is not used. The default value is 5.
  • nr_colors is the number of colors used to color the graph. It is also used to determine how many DPUs will be used. Required.
  • path_to_graph_file is the path to the file containing the edges of the graph in COO format. Required.

Other modifications:

  • It is possible to modify the size of the buffer in the WRAM by modifying the value WRAM_BUFFER_SIZE inside dpu_util.h. Do not exceed 2048 bytes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published