Skip to content

Commit

Permalink
rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
YuWei-CH committed Nov 12, 2024
1 parent b30554f commit 02bf564
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions driver/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Builder struct {
useMagicMemoryCopy bool
middlewareD2HCycles int
middlewareH2DCycles int
memorySize uint64
cpuMemorySize uint64
}

// MakeBuilder creates a driver builder with some default configuration
Expand Down Expand Up @@ -76,7 +76,7 @@ func (b Builder) WithH2DCycles(h2dCycles int) Builder {
}

// WithMemorySize sets the memory size of the CPU.
func (b Builder) WithMemorySize(memorySize uint64) Builder {
func (b Builder) WithCPUMemorySize(memorySize uint64) Builder {
b.memorySize = memorySize

Check failure on line 80 in driver/builder.go

View workflow job for this annotation

GitHub Actions / Lint

b.memorySize undefined (type Builder has no field or method memorySize)

Check failure on line 80 in driver/builder.go

View workflow job for this annotation

GitHub Actions / Lint

b.memorySize undefined (type Builder has no field or method memorySize)

Check failure on line 80 in driver/builder.go

View workflow job for this annotation

GitHub Actions / Lint

b.memorySize undefined (type Builder has no field or method memorySize)
return b
}
Expand Down
4 changes: 0 additions & 4 deletions driver/driver.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package driver

import (
"fmt"
"log"
"reflect"
"runtime/debug"
Expand Down Expand Up @@ -462,9 +461,6 @@ func (d *Driver) distributeWGToGPUs(
panic("not all wg allocated")
}

// fmt.Sprintln("total WG: %d WG Per CU %d\n", totalWGCount, wgPerCU)
fmt.Printf("total WG: %d WG Per CU %d\n", totalWGCount, wgPerCU)

return wgDist
}

Expand Down
2 changes: 0 additions & 2 deletions driver/internal/memoryallocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ func (a *memoryAllocatorImpl) RegisterDevice(device *Device) {

state := device.MemState
state.setInitialAddress(a.totalStorageByteSize)

a.totalStorageByteSize += state.getStorageSize()

a.devices[device.ID] = device
}

Expand Down
6 changes: 3 additions & 3 deletions timing/cp/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func (b Builder) Build(name string) *CommandProcessor {
tracing.CollectTrace(cp, b.visTracer)
}

// if b.perfAnalyzer != nil {
// b.perfAnalyzer.RegisterComponent(cp)
// }
if b.perfAnalyzer != nil {
b.perfAnalyzer.RegisterComponent(cp)
}

return cp
}
Expand Down

0 comments on commit 02bf564

Please sign in to comment.