Skip to content

Commit

Permalink
solving conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanhuanO committed Oct 26, 2024
2 parents 1de9f1b + f19880b commit cd5ea7f
Show file tree
Hide file tree
Showing 308 changed files with 2,461 additions and 2,423 deletions.
4 changes: 1 addition & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,7 @@
"mode": "debug",
"program": "${workspaceFolder}/samples/fir",
"args": [
"-timing",
"-length=8192",
"-report-all",
"-parallel",
],
},
{
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![MGPUSim Test](https://github.com/sarchlab/mgpusim/actions/workflows/mgpusim_test.yml/badge.svg)](https://github.com/sarchlab/mgpusim/actions/workflows/mgpusim_test.yml)

[![Go Reference](https://pkg.go.dev/badge/github.com/sarchlab/mgpusim.svg)](https://pkg.go.dev/github.com/sarchlab/mgpusim)
[![Go Report Card](https://goreportcard.com/badge/github.com/sarchlab/mgpusim/v3)](https://goreportcard.com/report/github.com/sarchlab/mgpusim/v3)
[![Go Report Card](https://goreportcard.com/badge/github.com/sarchlab/mgpusim/v4)](https://goreportcard.com/report/github.com/sarchlab/mgpusim/v4)


MGPUSim is a high-flexibility, high-performance, high-accuracy GPU simulator. It models GPUs that run the AMD GCN3 instruction sets. One main feature of MGPUSim is the support for multi-GPU simulation (you can still use it for single-GPU architecture research).
Expand All @@ -16,10 +16,20 @@ MGPUSim is a high-flexibility, high-performance, high-accuracy GPU simulator. It
- Install the most recent version of Go from golang.org.
- Clone this repository, assuming the path is `[mgpusim_home]`.
- Change your current directory to `[mgpusim_home]/samples/fir`.
- Compile the simulator with the benchmark with `go build`. The compiler will generate an executed called `fir` (on Linux or Mac OS) or `fir.exe` (on Windows) for you.
- Compile the simulator with the benchmark with `go build`. The compiler will generate an executable file called `fir` (on Linux or Mac OS) or `fir.exe` (on Windows) for you.
- Run the simulation with `./fir -timing --report-all` to run the simulation.
- Check the generated `metrics.csv` file for high-level metrics output.

## Develop with Modified Version of Akita (or other depending libraries)

If a modification to Akita is required, you can clone Akita next to the MGPUSim directory in your system. Then, you can modify the `go.mod` file to include the following line.

```
replace github.com/sarchlab/akita/v4 => ../akita
```

This line will direct the go compiler to use your local version of Akita rather than the official release of Akita.

## Benchmark Support

| AMD APP SDK | DNN Mark | HeteroMark | Polybench | Rodinia | SHOC |
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/alu/alu.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alu

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type ALU interface {
withParent(aluGroup *ALUGroup) ALU
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/alu/builder.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alu

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type ALUGroup struct {
meta *aluGroupMetaData
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/alu/int32.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alu

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type int32ALU struct {
parent *ALUGroup
Expand Down
4 changes: 2 additions & 2 deletions accelsim_tracing/benchmark/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package benchmark
import (
"errors"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/trace"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/trace"
)

type BenchMark struct {
Expand Down
4 changes: 2 additions & 2 deletions accelsim_tracing/gpc/builder.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gpc

import (
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/sm"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/sm"
)

type GPC struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/gpc/default.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gpc

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type defaultDispatcher struct {
parent *GPC
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/gpc/dispatcher.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gpc

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type gpcDispatcher interface {
withParent(gpc *GPC) gpcDispatcher
Expand Down
4 changes: 2 additions & 2 deletions accelsim_tracing/gpu/builder.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gpu

import (
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpc"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpc"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type GPU struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/gpu/default.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gpu

import (
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type defaultDispatcher struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/gpu/dispatcher.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gpu

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type gpuDispatcher interface {
withParent(gpu *GPU) gpuDispatcher
Expand Down
4 changes: 2 additions & 2 deletions accelsim_tracing/sm/builder.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sm

import (
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/smunit"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/smunit"
)

type SM struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/sm/default.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sm

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type defaultDispatcher struct {
parent *SM
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/sm/dispacther.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sm

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type smDispatcher interface {
withParent(sm *SM) smDispatcher
Expand Down
4 changes: 2 additions & 2 deletions accelsim_tracing/smunit/builder.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package smunit

import (
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/alu"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/alu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type SMUnit struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/smunit/default.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package smunit

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type defaultDispatcher struct {
parent *SMUnit
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/smunit/dispatcher.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package smunit

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

type smUnitDispatcher interface {
withParent(sm *SMUnit) smUnitDispatcher
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/convert.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package trace

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"

func (tb *threadBlock) generateNVThreadBlock() *nvidia.ThreadBlock {
nvtb := &nvidia.ThreadBlock{
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package trace
import (
"path"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"
)

type kernel struct { // trace execs interface
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/memory_copy.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package trace

import "github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
import "github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"

type memCopy struct { // trace execs interface
parent *Trace
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/thread_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type threadBlock struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"
)

type Trace struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/trace_execs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"
)

type traceExecs interface {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/trace_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"
)

type traceGroup struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/trace_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type traceHeader struct {
Expand Down
2 changes: 1 addition & 1 deletion accelsim_tracing/trace/warp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type warp struct {
Expand Down
6 changes: 3 additions & 3 deletions accelsim_tracing/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"log"

"github.com/sarchlab/mgpusim/v3/accelsim_tracing/benchmark"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/benchmark"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v4/accelsim_tracing/nvidia"
)

type inputArguments struct {
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/bitonicsort/bitonicsort.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

var doPerPassVerify = false
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/fastwalshtransform/fastwalshtransform.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

// KernelArgs defines kernel arguments
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/floydwarshall/floydwarshall.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

// KernelArgs defines kernel arguments
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/amdappsdk/matrixmultiplication/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math"
"math/rand"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v4/driver"
)

// Benchmark defines a benchmark
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/matrixmultiplication/mm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

// A MatrixMultiplier is a service type that can calculate the result of matrix
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/matrixtranspose/matrixtranspose.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

// KernelArgs defines kernel arguments
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/nbody/nbody.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

// KernelArgs defines kernel arguments
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/amdappsdk/simpleconvolution/simpleconvolution.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
// embed hsaco files
_ "embed"

"github.com/sarchlab/mgpusim/v3/driver"
"github.com/sarchlab/mgpusim/v3/insts"
"github.com/sarchlab/mgpusim/v3/kernels"
"github.com/sarchlab/mgpusim/v4/driver"
"github.com/sarchlab/mgpusim/v4/insts"
"github.com/sarchlab/mgpusim/v4/kernels"
)

// KernelArgs defines kernel arguments
Expand Down
10 changes: 5 additions & 5 deletions benchmarks/dnn/cpu_only_examples/lenet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"math"
"math/rand"

"github.com/sarchlab/mgpusim/v3/benchmarks/dnn/tensor"
"github.com/sarchlab/mgpusim/v3/benchmarks/dnn/training/optimization"
"github.com/sarchlab/mgpusim/v4/benchmarks/dnn/tensor"
"github.com/sarchlab/mgpusim/v4/benchmarks/dnn/training/optimization"

"github.com/sarchlab/mgpusim/v3/benchmarks/dnn/dataset/mnist"
"github.com/sarchlab/mgpusim/v4/benchmarks/dnn/dataset/mnist"

"github.com/sarchlab/mgpusim/v3/benchmarks/dnn/layers"
"github.com/sarchlab/mgpusim/v3/benchmarks/dnn/training"
"github.com/sarchlab/mgpusim/v4/benchmarks/dnn/layers"
"github.com/sarchlab/mgpusim/v4/benchmarks/dnn/training"
)

func main() {
Expand Down
Loading

0 comments on commit cd5ea7f

Please sign in to comment.