1. 17 8月, 2022 1 次提交
    • N
      [CodeStyle][NPU] use np.testing.assert_allclose instead of... · 2de0d676
      Nyakku Shigure 提交于
      [CodeStyle][NPU] use np.testing.assert_allclose instead of self.assertTrue(np.allclose(...)) (part 1) (#44988)
      
      * autofix
      
      * try resolve precision issues
      
      * revert some changes
      
      * clean some `err_msg`
      
      * 0.0001 -> 1e-4
      
      * update commented assert code
      
      * try to fix some shape errors
      
      * `numpy` -> `np`
      
      * empty commit, trigger kunlun ci, test=kunlun
      
      * empty commit, retrigger kunlun ci, test=kunlun
      
      * empty commit, trigger kunlun ci, try fix npu memcpy_h2d, test=kunlun
      
      * try fix npu import error, test=kunlun
      2de0d676
  2. 05 6月, 2022 1 次提交
    • S
      【code format check upgrade】 step2:yapf (#42944) · a072fca8
      Sing_chan 提交于
      * use yapf to format all python file
      
      * yapf exclude two unittests file for they rely on writing and reading file, and format will break them
      
      * disable diff_py_file because too many diff files cause command following failed
      a072fca8
  3. 27 5月, 2022 1 次提交
  4. 15 3月, 2022 1 次提交
  5. 17 11月, 2021 1 次提交
  6. 13 8月, 2021 1 次提交
    • T
      New Einsum API (#33821) · 8c8667f0
      Tongxin Bai 提交于
      * OP dot: refactor CPU kernels and get better loop performance.
      
      * Minor fix on code format.
      
      * Fixed minor errors.
      
      * Add new API: einsum
      
      * Update the Einsum unit test.
      
      One case failed with matmul_v2, where the dtype is int64:
      
      a = np.arange(2 * 3 * 1).reshape(2, 3, 1)
      b = np.arange(1)
      paddle.einsum("...i, ...i", a, b)
      
      * Test cases in test_einsum test floating point dtypes only.
      
      As of now Paddle only supports float/double dtypes in matmul, which is
      one of building blocks of this Einsum implementation. We decide not to
      test einsum against other dtypes.
      
      * Polish format.
      
      * More formatting.
      
      * Format...
      
      * Einsum: improve test coverage.
      
      * Einsum: bug fixes and more testcases for testing error messages
      
      * Einsum: fix format..
      
      * Einsum: fixed typo and format.
      
      * Einsum: format again...
      
      * Einsum: applied suggested changes.
      
      * Einsum API: improve API documentation.
      
      * Einsum API: apply suggested changes.
      
      * Einsum API: Add dygraph only note.
      
      * Einsum API: Add dygraph only note.
      
      * Einsum API: fixed unittest.
      8c8667f0