Skip to content

faseelmo/noc_pysim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note:

When a packet is received (from outside the PE) or a packet is generated (inside the PE) and multiple tasks inside the Processing Element is dependent on this Packet, then the packet is copied to all the dependent tasks. Assumption here is that the cache is big enough to store the packet.

The require and generate of nodes/tasks in the graph should match. Might observe weird behavior otherwise.

0. Prerequisites

Setting up the environment

If your python version is earlier than 3.9, consider updating a newer one. Follow tutorial here.

Run the following script

source venv_script.sh 

Run all tests using

python3 -m pytest tests

1. Data Generation

Automated Approach

To create random graphs, to run those graphs through a simulator and to split training and test dataset

./data/create_training_data.sh GEN_COUNT NUM_NODES

GEN_COUNT is the total number of graphs that'll be generated.
NUM_NODES is the max number of node that'll be possible for the generated graphs.

Alternatively, the above data generation pipeline can also be executed individually as follows

 1. Generating Graphs
python3 -m data.create_graph_tasks --help # To see the arg list
# refer data/create_training_data.sh for usage
 2. Finding Latency on generated graphs
python3 -m data.simulate_latency_on_graphs --help # To see the arg list
 3. Splitting train and test data
python3 -m data.create_test_data

Inspect Generated Data

python3 -m data.inspect_data
python3 -m data.histogram_data # To see the frequency of number
                               # of nodes in test and training data

2. Training

Parameters for training can be modified in training/params.yaml Start the training using

python3 -m training.train directory_name

Note: Results will be saved in training/results/directory_name

3. Performance Metric

Mapping Metric

python3 -m training.map_metric --model_path training/results/directory_name --find

The find flag will check the mapping metric for each saved model. The results will be saved in training/results/directory_name/results.txt.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages