-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Plugin] Fix Custom device in eager mode, test=develop
- Loading branch information
Showing
8 changed files
with
60 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
py_test(test_custom_kernel_dot SRCS test_custom_kernel_dot.py) | ||
py_test(test_custom_kernel_load SRCS test_custom_kernel_load.py) | ||
file( | ||
GLOB TEST_OPS | ||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" | ||
"test_*.py") | ||
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") | ||
|
||
set(CUSTOM_ENVS | ||
PADDLE_SOURCE_DIR=${PADDLE_SOURCE_DIR} | ||
PADDLE_BINARY_DIR=${PADDLE_BINARY_DIR} | ||
CUSTOM_DEVICE_ROOT=${CMAKE_BINARY_DIR}/python/paddle/fluid/tests/custom_kernel | ||
) | ||
|
||
foreach(TEST_OP ${TEST_OPS}) | ||
py_test(${TEST_OP} SRCS ${TEST_OP}.py ENVS ${CUSTOM_ENVS}) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
if(WITH_CUSTOM_DEVICE) | ||
py_test(test_custom_cpu_plugin SRCS test_custom_cpu_plugin.py) | ||
set_tests_properties(test_custom_cpu_plugin PROPERTIES TIMEOUT 120) | ||
file( | ||
GLOB TEST_OPS | ||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" | ||
"test_*.py") | ||
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") | ||
|
||
set(CUSTOM_ENVS | ||
PADDLE_SOURCE_DIR=${PADDLE_SOURCE_DIR} | ||
PADDLE_BINARY_DIR=${PADDLE_BINARY_DIR} | ||
CUSTOM_DEVICE_ROOT=${CMAKE_BINARY_DIR}/python/paddle/fluid/tests/custom_runtime | ||
) | ||
|
||
foreach(TEST_OP ${TEST_OPS}) | ||
py_test(${TEST_OP} SRCS ${TEST_OP}.py ENVS ${CUSTOM_ENVS}) | ||
endforeach() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters