Skip to content

Commit

Permalink
perf: update cuda algo (#219)
Browse files Browse the repository at this point in the history
* perf: updatecuda algo

* chore: remove unnessary code
  • Loading branch information
hunjixin authored Jul 3, 2024
1 parent f409a23 commit 20ad59c
Show file tree
Hide file tree
Showing 8 changed files with 2,721 additions and 1,951 deletions.
12 changes: 9 additions & 3 deletions pkg/options/resource-provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ func GetDefaultResourceProviderPowOptions() resourceprovider.ResourceProviderPow
DisablePow: GetDefaultServeOptionBool("DISABLE_POW", false),
NumWorkers: GetDefaultServeOptionInt("NUM_WORKER", 0),

CudaGridSize: GetDefaultServeOptionInt("CUDA_GRID_SIZE", 256),
CudaBlockSize: GetDefaultServeOptionInt("CUDA_BLOCK_SIZE", 512),
CudaGridSize: GetDefaultServeOptionInt("CUDA_GRID_SIZE", 128),
CudaBlockSize: GetDefaultServeOptionInt("CUDA_BLOCK_SIZE", 1024),
CudaHashsPerThread: GetDefaultServeOptionInt("CUDA_HASH_PER_THREAD", 1000),
}
}

Expand Down Expand Up @@ -95,12 +96,17 @@ func AddResourceProviderPowCliFlags(cmd *cobra.Command, options *resourceprovide

cmd.PersistentFlags().IntVar(
&options.CudaGridSize, "cuda-grid-size", options.CudaGridSize,
`Cuda grid size (CUDA_GRID_SIZE)`,
`Cuda grid size (sm*2) (CUDA_GRID_SIZE)`,
)
cmd.PersistentFlags().IntVar(
&options.CudaBlockSize, "cuda-block-size", options.CudaBlockSize,
`Cuda block size (CUDA_BLOCK_SIZE)`,
)
cmd.PersistentFlags().IntVar(
&options.CudaHashsPerThread, "cuda-hash-per-thread", options.CudaHashsPerThread,
`Cuda hash per threads (CUDA_HASH_PER_THREAD)`,
)

}

func AddResourceProviderCliFlags(cmd *cobra.Command, options *resourceprovider.ResourceProviderOptions) {
Expand Down
26 changes: 0 additions & 26 deletions pkg/resourceprovider/cudaminer/config.h

This file was deleted.

Loading

0 comments on commit 20ad59c

Please sign in to comment.