Skip to content

Commit

Permalink
Remove numba dependency
Browse files Browse the repository at this point in the history
Summary:
TSIA - we want to deprecate numba in fbcode when moving to new compiler tiers.

Converted the old test to a non-numba regular python op test.

Reviewed By: xw285cornell

Differential Revision: D10519910

fbshipit-source-id: 0e9188a6d0fc159100f0db704b106fbfde3c5833
  • Loading branch information
Yangqing Jia authored and facebook-github-bot committed Oct 24, 2018
1 parent a6949ab commit ff508c9
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions caffe2/python/operator_test/python_op_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,11 @@
import numpy as np
import unittest

if workspace.is_asan:
# Numba seems to be not compatible with ASAN (at least at Facebook)
# so if we are in asan mode, we disable Numba which further disables
# the numba python op test.
HAS_NUMBA = False
else:
try:
import numba
HAS_NUMBA = True
except ImportError:
HAS_NUMBA = False


class PythonOpTest(hu.HypothesisTestCase):
@unittest.skipIf(not HAS_NUMBA, "")
@given(x=hu.tensor(),
n=st.integers(min_value=1, max_value=20),
w=st.integers(min_value=1, max_value=20))
def test_multithreaded_evaluation_numba_nogil(self, x, n, w):
@numba.jit(nopython=True, nogil=True)
def test_simple_python_op(self, x, n, w):
def g(input_, output):
output[...] = input_

Expand Down

0 comments on commit ff508c9

Please sign in to comment.