Skip to content

Commit

Permalink
Include accelsim_tracing in linting
Browse files Browse the repository at this point in the history
  • Loading branch information
syifan committed Dec 6, 2023
1 parent 55b7416 commit d4a3161
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 40 deletions.
5 changes: 0 additions & 5 deletions acceclsim_tracing/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions acceclsim_tracing/go.sum

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alu

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

type ALU interface {
withParent(aluGroup *ALUGroup) ALU
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alu

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

type ALUGroup struct {
meta *aluGroupMetaData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alu

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

type int32ALU struct {
parent *ALUGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package benchmark
import (
"errors"

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

type BenchMark struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gpc

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

type GPC struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gpc

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

type defaultDispatcher struct {
parent *GPC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gpc

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

type gpcDispatcher interface {
withParent(gpc *GPC) gpcDispatcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gpu

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

type GPU struct {
Expand Down Expand Up @@ -144,6 +144,7 @@ func (g *GPU) Build() {
}
}

// RunThreadBlock runs a threadblock on the GPU
// [todo] how to handle the relationship between trace.threadblock and truethreadblock
func (g *GPU) RunThreadBlock(tb *nvidia.ThreadBlock) {
g.dispatcher.dispatch(tb)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gpu

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

type defaultDispatcher struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gpu

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

type gpuDispatcher interface {
withParent(gpu *GPU) gpuDispatcher
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sm

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

type SM struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sm

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

type defaultDispatcher struct {
parent *SM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sm

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

type smDispatcher interface {
withParent(sm *SM) smDispatcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package smunit

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

type SMUnit struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package smunit

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

type defaultDispatcher struct {
parent *SMUnit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package smunit

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

type smUnitDispatcher interface {
withParent(sm *SMUnit) smUnitDispatcher
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package trace

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

func (tb *threadBlock) generateNVThreadBlock() *nvidia.ThreadBlock {
nvtb := &nvidia.ThreadBlock{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package trace
import (
"path"

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

type kernel struct { // trace execs interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package trace

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

type memCopy struct { // trace execs interface
parent *Trace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

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

type threadBlock struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path"

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

type Trace struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

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

type traceExecs interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"strings"

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

type traceGroup struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"strings"

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

type traceHeader struct {
Expand Down Expand Up @@ -56,6 +56,8 @@ func parseHeaderParam(lines []string) *traceHeader {
}

// Shaoyu: Maybe we can parse the attrs in order and avoid using swicth-case here
//
//nolint:funlen,gocyclo
func (th *traceHeader) updateParam(key string, value string, rawText string) {
err := error(nil)
switch key {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

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

type warp struct {
Expand Down
6 changes: 3 additions & 3 deletions acceclsim_tracing/tracer.go → 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/accelsim_tracing/benchmark"
"github.com/sarchlab/mgpusim/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/accelsim_tracing/nvidia"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/benchmark"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/gpu"
"github.com/sarchlab/mgpusim/v3/accelsim_tracing/nvidia"
)

type inputArguments struct {
Expand Down

0 comments on commit d4a3161

Please sign in to comment.