use qpbo in perceptron test if available
only test one inference algorithm in test_multinomial_grid_unaries.