Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce unittest gpu memory #3448

Closed
wants to merge 1 commit into from

Conversation

QiJune
Copy link
Member

@QiJune QiJune commented Aug 14, 2017

fix #3437

@@ -11,10 +11,10 @@ def test_int_tensor(self):

tensor = var.get_tensor()

tensor.set_dims([1000, 784])
tensor.set_dims([100, 84])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try three configurations -- [7, 0], [0, 7], [7,13] -- 7 and 13 are just small prime numbers. Prime numbers are reasonable becaue they are not power of 2 or any way defactorizable. 0 is a good boundary case.

@@ -18,7 +18,7 @@ class TestSoftmaxOp(unittest.TestCase):

def setUp(self):
self.type = "softmax"
self.inputs = {'X': np.random.random((32, 100)).astype("float32")}
self.inputs = {'X': np.random.random((32, 22)).astype("float32")}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us use small prime numbers.

@@ -24,7 +24,7 @@ def setUp(self):
class CrossEntropyGradOpTest(GradientChecker):
def test_softmax_grad(self):
op = create_op("onehot_cross_entropy")
batch_size = 100
batch_size = 32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add test case with batch size = 0./

@@ -13,8 +13,8 @@ class TestAddOp(unittest.TestCase):
def setUp(self):
self.type = "add_two"
self.inputs = {
'X': numpy.random.random((102, 105)).astype("float32"),
'Y': numpy.random.random((102, 105)).astype("float32")
'X': numpy.random.random((12, 15)).astype("float32"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add cases like

  • [7, 0]
  • [0, 7]
  • [0, 0]
  • [7, 13]

7 and 13 are just small prime numbers.

@luotao1
Copy link
Contributor

luotao1 commented Feb 1, 2019

感谢您给PaddlePaddle贡献代码。由于Paddle V1/V2版本已不再维护,相关代码也已从develop分支上删除,因此关闭您的PR,欢迎您向Paddle最新版-Fluid贡献代码。
Thanks for contributing to PaddlePaddle! Since V1/V2 will not be maintained anymore, and related codes have been deleted from develop branch as well, we close this PR. Welcome to contribute to Fluid——the latest version of PaddlePaddle.

@luotao1 luotao1 closed this Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Control GPU memory usage in unit tests
3 participants