Fix loop-level instrumentation + more (#32)

- fix loop-level instrumentation
- support loop instrumentation w/o debug symbols via loop number
- improve module_function messages
- serialize num_basic_blocks
- serialize num_outer_loops
- serialize is_num_instructions_constrained
- serialize is_loop_num_instructions_constrained
- updated transpose example to use uniform_int_distribution
- added transpose loop test
- added fail regexes for tests which enable loop instrumentation
- use module->getFullName in get_loop_file_line_info
- use module->getFullName in get_func_file_line_info
- use module->getFullName in get_basic_block_file_line_info
This commit is contained in:
Jonathan R. Madsen
2022-06-10 06:57:50 -05:00
committed by GitHub
parent 1db3934f85
commit a640fbdb29
9 changed files with 207 additions and 98 deletions
+5 -1
View File
@@ -31,6 +31,7 @@ THE SOFTWARE.
#include <iomanip>
#include <iostream>
#include <mutex>
#include <random>
#include <thread>
#include <vector>
@@ -106,12 +107,15 @@ run(int rank, int tid, hipStream_t stream, int argc, char** argv)
std::cout << "[" << rank << "][" << tid << "] M: " << M << " N: " << N << std::endl;
_lk.unlock();
std::default_random_engine _engine{ std::random_device{}() * (rank + 1) * (tid + 1) };
std::uniform_int_distribution<int> _dist{ 0, 1000 };
size_t size = sizeof(int) * M * N;
int* inp_matrix = new int[size];
int* out_matrix = new int[size];
for(size_t i = 0; i < M * N; i++)
{
inp_matrix[i] = rand() % 1002;
inp_matrix[i] = _dist(_engine);
out_matrix[i] = 0;
}
int* in = nullptr;