Skip to content

Commit

Permalink
Add cuda device id
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefMarlin committed Sep 15, 2023
1 parent e3d05c0 commit 3968644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/objectPredict/objectPredict.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (c *Client) initSession() (ModelSession, error) {
defer cudaOptions.Destroy()

// This is a clunky API, but it reflects how the underlying C API sets CUDA options.
err = cudaOptions.Update(map[string]string{"device_id": string(c.CudaDeviceID)})
err = cudaOptions.Update(map[string]string{"device_id": fmt.Sprintf("%d", c.CudaDeviceID)})
if err != nil {
return ModelSession{}, fmt.Errorf("error updating CUDA provider options: %w", err)
}
Expand Down

0 comments on commit 3968644

Please sign in to comment.