Skip to content

Commit

Permalink
Add torch.setnumthreads(1) to openface_server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Amos committed Jul 7, 2016
1 parent e030689 commit 7fd3746
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openface/openface_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ require 'image'
io.stdout:setvbuf 'no'
torch.setdefaulttensortype('torch.FloatTensor')

-- OpenMP-acceleration causes slower performance. Related issues:
-- https://groups.google.com/forum/#!topic/cmu-openface/vqkkDlbfWZw
-- https://github.com/torch/torch7/issues/691
-- https://github.com/torch/image/issues/7
torch.setnumthreads(1)

local cmd = torch.CmdLine()
cmd:text()
cmd:text('Face recognition server.')
Expand Down

0 comments on commit 7fd3746

Please sign in to comment.