Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
romnn committed Mar 30, 2024
1 parent 4411354 commit 9adf9e7
Show file tree
Hide file tree
Showing 13 changed files with 359 additions and 427 deletions.
8 changes: 4 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ accelsim-sim = "run --release --package accelsim-sim --"
playground-sim = "run --release --package playground-sim --"
pchase = "run --release --package gpucachesim-benchmarks --bin pchase --"

t = "test -- --test-threads=1"
tt = "test --release -- --test-threads=1"
t = "test --features local-data -- --test-threads=1"
tt = "test --release --features local-data -- --test-threads=1"

tv = "test -- --nocapture --test-threads=1"
ttv = "test --release -- --nocapture --test-threads=1"
tv = "test --features local-data -- --nocapture --test-threads=1"
ttv = "test --release --features local-data -- --nocapture --test-threads=1"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

/debug.*
/debug*.*
/temp-traces
*debug-trace
.ipynb_checkpoints
Pipfile.lock
Expand Down
24 changes: 0 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions accelsim/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.DS_Store

# make sure, this should also be excluded in the simulator directory
accel-sim-framework-dev/gpu-simulator/build
accel-sim-framework-dev/gpu-simulator/bin
accel-sim-framework-dev/gpu-simulator/gpgpu-sim/build
accel-sim-framework-dev/gpu-simulator/gpgpu-sim/bin

# build logs
build.log*
accel-sim-framework-dev-*/
Expand Down
4 changes: 4 additions & 0 deletions accelsim/.ignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
accel-sim-framework-dev/util/
accel-sim-framework-dev/gpu-simulator/build
accel-sim-framework-dev/gpu-simulator/bin
accel-sim-framework-dev/gpu-simulator/gpgpu-sim/build
accel-sim-framework-dev/gpu-simulator/gpgpu-sim/bin
4 changes: 3 additions & 1 deletion exec/src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,11 @@ pub mod visit {
self.graph[*last_branch_node_idx],
self.graph[node_idx],
);
// continue from this reconvergence point

// all paths from last branch node have been traversed
self.dominator_stack.pop();

// continue from this reconvergence point
for (outgoing_edge_idx, next_node_idx) in
self.graph.outgoing_neigbors(node_idx)
{
Expand Down
18 changes: 11 additions & 7 deletions exec/src/tracegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,21 +677,25 @@ impl TraceGenerator for Tracer {
let is_load = access.kind == model::MemAccessKind::Load;
let is_store = access.kind == model::MemAccessKind::Store;
let mut instr_opcode = match access.mem_space {
model::MemorySpace::Local if is_load => "LDL.E".to_string(),
model::MemorySpace::Global if is_load => "LDG.E".to_string(),
model::MemorySpace::Shared if is_load => "LDS.E".to_string(),
model::MemorySpace::Local if is_load => "LDL".to_string(),
model::MemorySpace::Global if is_load => "LDG".to_string(),
model::MemorySpace::Shared if is_load => "LDS".to_string(),
// MemorySpace::Texture if is_load => "LDG".to_string(),
model::MemorySpace::Constant if is_load => "LDC.E".to_string(),
model::MemorySpace::Local if is_store => "STL.E".to_string(),
model::MemorySpace::Global if is_store => "STG.E".to_string(),
model::MemorySpace::Shared if is_store => "STS.E".to_string(),
model::MemorySpace::Constant if is_load => "LDC".to_string(),
model::MemorySpace::Local if is_store => "STL".to_string(),
model::MemorySpace::Global if is_store => "STG".to_string(),
model::MemorySpace::Shared if is_store => "STS".to_string(),
// MemorySpace::Texture if is_store => "LDG".to_string(),
model::MemorySpace::Constant if is_store => {
todo!("constant store")
}
other => panic!("unknown memory space {other:?}"),
};

if access.size >= 64 {
instr_opcode += ".E";
}

if access.bypass_l1 {
instr_opcode += ".CG";
}
Expand Down
2 changes: 1 addition & 1 deletion ptx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ bytes = "1"
[dev-dependencies]
once_cell = "1"
snailquote = "0"
pest-test = "0"
# pest-test = "0"
diff = { path = "../diff" }
Loading

0 comments on commit 9adf9e7

Please sign in to comment.