Skip to content

Instantly share code, notes, and snippets.

@prabindh
Created December 2, 2017 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabindh/9d0c589e2eed392822c7174dde31e7d0 to your computer and use it in GitHub Desktop.
Save prabindh/9d0c589e2eed392822c7174dde31e7d0 to your computer and use it in GitHub Desktop.
// ** NOTE: You would need to perform a "cudaSetDevice(gpuId)" with this same gpuId before any CUDA operations are performed on this gpuId
bool ArapahoV2::Setup(
ArapahoV2Params & p,
int & expectedWidth,
int & expectedHeight
int gpuId
)
{
/// All old stuff
load_weights(&net, p.weightfile);
set_batch_network(&net, 1);
l = net.layers[net.n-1];
// ** Add a new GPU index here instead of default
net.gpu_index = gpuId;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment