mirror of
https://github.com/luxfi/evmgpu.git
synced 2026-10-30 16:57:11 +00:00
The core/parallel and dag packages had _gpu.go variants alongside base implementations. Decomplect: GPU dispatch is a backend, not a package — moved to runtime selection inside engine.go / hasher.go / conflicts.go. Drops: - core/parallel/engine_gpu.go (folded into engine.go) - core/parallel/gpu_hasher.go + gpu_hasher_test.go (folded into hasher.go) - dag/conflicts_gpu.go (folded into conflicts.go + conflicts_cpu.go) Also: cleanup of .bak test files, .! Finder temp files gitignored, go.mod + go.sum merged from upstream.
37 lines
813 B
Go
37 lines
813 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package runner
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
log "github.com/luxfi/log"
|
|
"github.com/luxfi/sys/ulimit"
|
|
"github.com/luxfi/vm/rpc"
|
|
|
|
"github.com/luxfi/evmgpu/plugin/evm"
|
|
)
|
|
|
|
func Run(versionStr string) {
|
|
printVersion, err := PrintVersion()
|
|
if err != nil {
|
|
fmt.Printf("couldn't get config: %s", err)
|
|
os.Exit(1)
|
|
}
|
|
if printVersion && versionStr != "" {
|
|
fmt.Println(versionStr)
|
|
os.Exit(0)
|
|
}
|
|
if err := ulimit.Set(ulimit.DefaultFDLimit, log.Root()); err != nil {
|
|
fmt.Printf("failed to set fd limit correctly due to: %s", err)
|
|
os.Exit(1)
|
|
}
|
|
if err := rpc.Serve(context.Background(), log.Root(), &evm.VM{}); err != nil {
|
|
fmt.Printf("rpc.Serve error: %s\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|