提交 fc374821 编写于 作者: Y Yi Wang

Correct #include path

上级 90648f33
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include <vector> #include <vector>
......
...@@ -20,9 +20,9 @@ limitations under the License. */ ...@@ -20,9 +20,9 @@ limitations under the License. */
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/framework/type_defs.h" #include "paddle/fluid/framework/type_defs.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,17 +12,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,17 +12,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/backward.h" #include "paddle/fluid/framework/backward.h"
#include "paddle/operators/net_op.h" #include "paddle/fluid/operators/net_op.h"
#include <deque> #include <deque>
#include <list> #include <list>
#include <memory> #include <memory>
#include <unordered_set> #include <unordered_set>
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
#include "paddle/operators/net_op.h" #include "paddle/fluid/operators/net_op.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -18,8 +18,8 @@ limitations under the License. */ ...@@ -18,8 +18,8 @@ limitations under the License. */
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/backward.h" #include "paddle/fluid/framework/backward.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/op_desc.h" #include "paddle/fluid/framework/op_desc.h"
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
#include "paddle/framework/var_desc.h" #include "paddle/fluid/framework/var_desc.h"
#include "paddle/operators/net_op.h" #include "paddle/fluid/operators/net_op.h"
USE_NO_KERNEL_OP(fill_constant); USE_NO_KERNEL_OP(fill_constant);
......
...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -20,10 +20,10 @@ limitations under the License. */ ...@@ -20,10 +20,10 @@ limitations under the License. */
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include "paddle/framework/op_desc.h" #include "paddle/fluid/framework/op_desc.h"
#include "paddle/framework/proto_desc.h" #include "paddle/fluid/framework/proto_desc.h"
#include "paddle/framework/var_desc.h" #include "paddle/fluid/framework/var_desc.h"
#include "paddle/platform/macros.h" #include "paddle/fluid/platform/macros.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -54,5 +54,5 @@ void CloseChannel(Channel<T>* ch) { ...@@ -54,5 +54,5 @@ void CloseChannel(Channel<T>* ch) {
} // namespace framework } // namespace framework
} // namespace paddle } // namespace paddle
#include "paddle/framework/details/buffered_channel.h" #include "paddle/fluid/framework/details/buffered_channel.h"
#include "paddle/framework/details/unbuffered_channel.h" #include "paddle/fluid/framework/details/unbuffered_channel.h"
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/channel.h" #include "paddle/fluid/framework/channel.h"
#include <chrono> #include <chrono>
#include <thread> #include <thread>
......
...@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/data_device_transform.h" #include "paddle/fluid/framework/data_device_transform.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -13,10 +13,10 @@ limitations under the License. */ ...@@ -13,10 +13,10 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/framework/tensor_util.h" #include "paddle/fluid/framework/tensor_util.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,13 +14,13 @@ limitations under the License. */ ...@@ -14,13 +14,13 @@ limitations under the License. */
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/init.h" #include "paddle/fluid/framework/init.h"
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/framework/op_info.h" #include "paddle/fluid/framework/op_info.h"
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
#include "paddle/operators/elementwise_op_function.h" #include "paddle/fluid/operators/elementwise_op_function.h"
#include "paddle/operators/math/math_function.h" #include "paddle/fluid/operators/math/math_function.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -17,7 +17,7 @@ limitations under the License. */ ...@@ -17,7 +17,7 @@ limitations under the License. */
#include <cctype> #include <cctype>
#include <ostream> #include <ostream>
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/data_layout_transform.h" #include "paddle/fluid/framework/data_layout_transform.h"
#include "paddle/operators/math/math_function.h" #include "paddle/fluid/operators/math/math_function.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#pragma once #pragma once
#include "paddle/framework/op_kernel_type.h" #include "paddle/fluid/framework/op_kernel_type.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/framework/variable.h" #include "paddle/fluid/framework/variable.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/data_layout_transform.h" #include "paddle/fluid/framework/data_layout_transform.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
TEST(DataTransform, DataLayoutFunction) { TEST(DataTransform, DataLayoutFunction) {
using namespace paddle::framework; using namespace paddle::framework;
......
...@@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/data_transform.h" #include "paddle/fluid/framework/data_transform.h"
#include "paddle/framework/data_device_transform.h" #include "paddle/fluid/framework/data_device_transform.h"
#include "paddle/framework/data_layout_transform.h" #include "paddle/fluid/framework/data_layout_transform.h"
#include "paddle/framework/data_type_transform.h" #include "paddle/fluid/framework/data_type_transform.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -18,14 +18,14 @@ limitations under the License. */ ...@@ -18,14 +18,14 @@ limitations under the License. */
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "paddle/framework/op_kernel_type.h" #include "paddle/fluid/framework/op_kernel_type.h"
#include "paddle/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/framework/variable.h" #include "paddle/fluid/framework/variable.h"
#include "paddle/operators/math/math_function.h" #include "paddle/fluid/operators/math/math_function.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
#include "paddle/platform/macros.h" #include "paddle/fluid/platform/macros.h"
#include "paddle/platform/transform.h" #include "paddle/fluid/platform/transform.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,8 +14,8 @@ limitations under the License. */ ...@@ -14,8 +14,8 @@ limitations under the License. */
#pragma once #pragma once
#include <typeindex> #include <typeindex>
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,10 +12,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/data_type_transform.h" #include "paddle/fluid/framework/data_type_transform.h"
#include "paddle/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
#include "paddle/platform/transform.h" #include "paddle/fluid/platform/transform.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,10 +14,10 @@ limitations under the License. */ ...@@ -14,10 +14,10 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/op_kernel_type.h" #include "paddle/fluid/framework/op_kernel_type.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/framework/variable.h" #include "paddle/fluid/framework/variable.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/data_type_transform.h" #include "paddle/fluid/framework/data_type_transform.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/ddim.h" #include "paddle/fluid/framework/ddim.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -17,9 +17,9 @@ limitations under the License. */ ...@@ -17,9 +17,9 @@ limitations under the License. */
#include <initializer_list> #include <initializer_list>
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
#include "paddle/framework/dim.h" #include "paddle/fluid/framework/dim.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
#include "paddle/platform/variant.h" #include "paddle/fluid/platform/variant.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -15,7 +15,7 @@ limitations under the License. */ ...@@ -15,7 +15,7 @@ limitations under the License. */
#include <vector> #include <vector>
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/ddim.h" #include "paddle/fluid/framework/ddim.h"
TEST(DDim, Equality) { TEST(DDim, Equality) {
// construct a DDim from an initialization list // construct a DDim from an initialization list
......
...@@ -18,8 +18,8 @@ limitations under the License. */ ...@@ -18,8 +18,8 @@ limitations under the License. */
#include <deque> #include <deque>
#include <mutex> #include <mutex>
#include "paddle/framework/channel.h" #include "paddle/fluid/framework/channel.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/details/cow_ptr.h" #include "paddle/fluid/framework/details/cow_ptr.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
namespace paddle { namespace paddle {
......
...@@ -14,11 +14,11 @@ limitations under the License. */ ...@@ -14,11 +14,11 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/grad_op_desc_maker.h" #include "paddle/fluid/framework/grad_op_desc_maker.h"
#include "paddle/framework/op_info.h" #include "paddle/fluid/framework/op_info.h"
#include "paddle/framework/op_proto_maker.h" #include "paddle/fluid/framework/op_proto_maker.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/var_type_inference.h" #include "paddle/fluid/framework/var_type_inference.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -17,7 +17,7 @@ limitations under the License. */ ...@@ -17,7 +17,7 @@ limitations under the License. */
#include <condition_variable> #include <condition_variable>
#include <mutex> #include <mutex>
#include "paddle/framework/channel.h" #include "paddle/fluid/framework/channel.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#include <stdexcept> #include <stdexcept>
#include <type_traits> #include <type_traits>
#include "paddle/platform/assert.h" #include "paddle/fluid/platform/assert.h"
#include "paddle/platform/hostdevice.h" #include "paddle/fluid/platform/hostdevice.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <sstream> #include <sstream>
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/dim.h" #include "paddle/fluid/framework/dim.h"
__global__ void test(paddle::framework::Dim<2>* o) { __global__ void test(paddle::framework::Dim<2>* o) {
o[0] = paddle::framework::make_dim(5, 6); o[0] = paddle::framework::make_dim(5, 6);
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "unsupported/Eigen/CXX11/Tensor" #include "unsupported/Eigen/CXX11/Tensor"
namespace paddle { namespace paddle {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/eigen.h" #include "paddle/fluid/framework/eigen.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
namespace paddle { namespace paddle {
......
...@@ -12,19 +12,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,19 +12,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/executor.h" #include "paddle/fluid/framework/executor.h"
#include <set> #include <set>
#include "gflags/gflags.h" #include "gflags/gflags.h"
#include "paddle/framework/feed_fetch_method.h" #include "paddle/fluid/framework/feed_fetch_method.h"
#include "paddle/framework/feed_fetch_type.h" #include "paddle/fluid/framework/feed_fetch_type.h"
#include "paddle/framework/lod_rank_table.h" #include "paddle/fluid/framework/lod_rank_table.h"
#include "paddle/framework/lod_tensor_array.h" #include "paddle/fluid/framework/lod_tensor_array.h"
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
#include "paddle/framework/reader.h" #include "paddle/fluid/framework/reader.h"
#include "paddle/platform/place.h" #include "paddle/fluid/platform/place.h"
#include "paddle/platform/profiler.h" #include "paddle/fluid/platform/profiler.h"
DECLARE_bool(benchmark); DECLARE_bool(benchmark);
DEFINE_bool(check_nan_inf, false, DEFINE_bool(check_nan_inf, false,
......
...@@ -14,11 +14,11 @@ limitations under the License. */ ...@@ -14,11 +14,11 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/op_info.h" #include "paddle/fluid/framework/op_info.h"
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include "paddle/framework/scope.h" #include "paddle/fluid/framework/scope.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/feed_fetch_method.h" #include "paddle/fluid/framework/feed_fetch_method.h"
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/framework/variable.h" #include "paddle/fluid/framework/variable.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,8 +14,8 @@ limitations under the License. */ ...@@ -14,8 +14,8 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/feed_fetch_type.h" #include "paddle/fluid/framework/feed_fetch_type.h"
#include "paddle/framework/scope.h" #include "paddle/fluid/framework/scope.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -15,7 +15,7 @@ limitations under the License. */ ...@@ -15,7 +15,7 @@ limitations under the License. */
#pragma once #pragma once
#include <string> #include <string>
#include <vector> #include <vector>
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -16,8 +16,8 @@ limitations under the License. */ ...@@ -16,8 +16,8 @@ limitations under the License. */
#include <string> #include <string>
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include "paddle/framework/op_desc.h" #include "paddle/fluid/framework/op_desc.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -16,10 +16,10 @@ limitations under the License. */ ...@@ -16,10 +16,10 @@ limitations under the License. */
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include "paddle/framework/init.h" #include "paddle/fluid/framework/init.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
#include "paddle/platform/place.h" #include "paddle/fluid/platform/place.h"
#include "paddle/string/piece.h" #include "paddle/string/piece.h"
namespace paddle { namespace paddle {
......
...@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and ...@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/init.h" #include "paddle/fluid/framework/init.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
TEST(InitDevices, CPU) { TEST(InitDevices, CPU) {
using paddle::framework::InitDevices; using paddle::framework::InitDevices;
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/lod_rank_table.h" #include "paddle/fluid/framework/lod_rank_table.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once #pragma once
#include <iosfwd> #include <iosfwd>
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/framework/data_type.h" #include "paddle/fluid/framework/data_type.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/memory/memcpy.h" #include "paddle/fluid/memory/memcpy.h"
#include "paddle/memory/memory.h" #include "paddle/fluid/memory/memory.h"
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
......
...@@ -21,12 +21,12 @@ limitations under the License. */ ...@@ -21,12 +21,12 @@ limitations under the License. */
#endif #endif
#include <glog/logging.h> #include <glog/logging.h>
#include "paddle/framework/ddim.h" #include "paddle/fluid/framework/ddim.h"
#include "paddle/framework/mixed_vector.h" #include "paddle/fluid/framework/mixed_vector.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/framework/tensor_util.h" #include "paddle/fluid/framework/tensor_util.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
#include "paddle/platform/place.h" #include "paddle/fluid/platform/place.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
#pragma once #pragma once
#include <vector> #include <vector>
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include <glog/logging.h> #include <glog/logging.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
#include <cuda.h> #include <cuda.h>
#include <cuda_runtime.h> #include <cuda_runtime.h>
#include <stdio.h> #include <stdio.h>
#include "paddle/framework/init.h"
#include "paddle/framework/lod_tensor.h"
#include "paddle/platform/assert.h"
#include <gtest/gtest.h> #include "gtest/gtest.h"
#include <paddle/platform/place.h> #include "paddle/fluid/framework/init.h"
#include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/fluid/platform/assert.h"
#include "paddle/fluid/platform/place.h"
__global__ void test(size_t* a, int size) { __global__ void test(size_t* a, int size) {
for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < size; for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < size;
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include <initializer_list> #include <initializer_list>
#include <vector> #include <vector>
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/framework/tensor_util.h" #include "paddle/fluid/framework/tensor_util.h"
#include "glog/logging.h" #include "glog/logging.h"
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
#include "glog/logging.h" #include "glog/logging.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/mixed_vector.h" #include "paddle/fluid/framework/mixed_vector.h"
#include "paddle/platform/gpu_info.h" #include "paddle/fluid/platform/gpu_info.h"
template <typename T> template <typename T>
using vec = paddle::framework::Vector<T>; using vec = paddle::framework::Vector<T>;
......
...@@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/op_desc.h" #include "paddle/fluid/framework/op_desc.h"
#include <functional> #include <functional>
#include <mutex> #include <mutex>
#include <unordered_map> #include <unordered_map>
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include "paddle/framework/shape_inference.h" #include "paddle/fluid/framework/shape_inference.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -16,9 +16,9 @@ limitations under the License. */ ...@@ -16,9 +16,9 @@ limitations under the License. */
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/type_defs.h" #include "paddle/fluid/framework/type_defs.h"
#include "paddle/framework/var_desc.h" #include "paddle/fluid/framework/var_desc.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/op_info.h" #include "paddle/fluid/framework/op_info.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -18,9 +18,9 @@ limitations under the License. */ ...@@ -18,9 +18,9 @@ limitations under the License. */
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/type_defs.h" #include "paddle/fluid/framework/type_defs.h"
#include "paddle/platform/macros.h" #include "paddle/fluid/platform/macros.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,11 +14,11 @@ limitations under the License. */ ...@@ -14,11 +14,11 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/data_layout.h" #include "paddle/fluid/framework/data_layout.h"
#include "paddle/framework/data_type.h" #include "paddle/fluid/framework/data_type.h"
#include "paddle/framework/library_type.h" #include "paddle/fluid/framework/library_type.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
#include "paddle/platform/place.h" #include "paddle/fluid/platform/place.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/op_kernel_type.h" #include "paddle/fluid/framework/op_kernel_type.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <iostream> #include <iostream>
......
...@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/op_proto_maker.h" #include "paddle/fluid/framework/op_proto_maker.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -13,8 +13,8 @@ limitations under the License. */ ...@@ -13,8 +13,8 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/op_proto_maker.h" #include "paddle/fluid/framework/op_proto_maker.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include <paddle/framework/op_registry.h> #include "paddle/fluid/framework/op_registry.h"
#include <vector> #include <vector>
......
...@@ -22,14 +22,14 @@ limitations under the License. */ ...@@ -22,14 +22,14 @@ limitations under the License. */
#include <unordered_set> #include <unordered_set>
#include "glog/logging.h" // For VLOG() #include "glog/logging.h" // For VLOG()
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/details/op_registry.h" #include "paddle/fluid/framework/details/op_registry.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/framework/grad_op_desc_maker.h" #include "paddle/fluid/framework/grad_op_desc_maker.h"
#include "paddle/framework/op_desc.h" #include "paddle/fluid/framework/op_desc.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/scope.h" #include "paddle/fluid/framework/scope.h"
#include "paddle/framework/shape_inference.h" #include "paddle/fluid/framework/shape_inference.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <glog/logging.h> #include <glog/logging.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
namespace pd = paddle::framework; namespace pd = paddle::framework;
......
...@@ -16,11 +16,11 @@ limitations under the License. */ ...@@ -16,11 +16,11 @@ limitations under the License. */
#include <algorithm> #include <algorithm>
#include "paddle/framework/data_transform.h" #include "paddle/fluid/framework/data_transform.h"
#include "paddle/framework/executor.h" #include "paddle/fluid/framework/executor.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/shape_inference.h" #include "paddle/fluid/framework/shape_inference.h"
#include "paddle/framework/var_type.h" #include "paddle/fluid/framework/var_type.h"
DECLARE_bool(benchmark); DECLARE_bool(benchmark);
......
...@@ -22,17 +22,17 @@ limitations under the License. */ ...@@ -22,17 +22,17 @@ limitations under the License. */
#include <vector> #include <vector>
#include "glog/logging.h" // For VLOG #include "glog/logging.h" // For VLOG
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/framework/op_info.h" #include "paddle/fluid/framework/op_info.h"
#include "paddle/framework/op_kernel_type.h" #include "paddle/fluid/framework/op_kernel_type.h"
#include "paddle/framework/scope.h" #include "paddle/fluid/framework/scope.h"
#include "paddle/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
#include "paddle/platform/variant.h" #include "paddle/fluid/platform/variant.h"
#include "paddle/utils/Error.h" #include "paddle/utils/Error.h"
namespace paddle { namespace paddle {
......
...@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and ...@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/init.h" #include "paddle/fluid/framework/init.h"
#include "paddle/framework/op_info.h" #include "paddle/fluid/framework/op_info.h"
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/feed_fetch_type.h" #include "paddle/fluid/framework/feed_fetch_type.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -16,10 +16,10 @@ limitations under the License. */ ...@@ -16,10 +16,10 @@ limitations under the License. */
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/framework/proto_desc.h" #include "paddle/fluid/framework/proto_desc.h"
#include "paddle/platform/macros.h" #include "paddle/fluid/platform/macros.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/prune.h" #include "paddle/fluid/framework/prune.h"
#include <algorithm> #include <algorithm>
#include <set> #include <set>
......
...@@ -14,8 +14,8 @@ limitations under the License. */ ...@@ -14,8 +14,8 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/prune.h" #include "paddle/fluid/framework/prune.h"
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/operators/net_op.h" #include "paddle/fluid/operators/net_op.h"
#include "paddle/framework/block_desc.h" #include "paddle/fluid/framework/block_desc.h"
#include "paddle/framework/op_desc.h" #include "paddle/fluid/framework/op_desc.h"
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/reader.h" #include "paddle/fluid/framework/reader.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#pragma once #pragma once
#include "paddle/framework/ddim.h" #include "paddle/fluid/framework/ddim.h"
#include "paddle/framework/lod_tensor_array.h" #include "paddle/fluid/framework/lod_tensor_array.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/scope.h" #include "paddle/fluid/framework/scope.h"
#include <memory> // for unique_ptr #include <memory> // for unique_ptr
#include <mutex> // for call_once #include <mutex> // for call_once
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/framework/threadpool.h" #include "paddle/fluid/framework/threadpool.h"
#include "paddle/string/printf.h" #include "paddle/string/printf.h"
DEFINE_bool(benchmark, false, DEFINE_bool(benchmark, false,
......
...@@ -19,8 +19,8 @@ limitations under the License. */ ...@@ -19,8 +19,8 @@ limitations under the License. */
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include "paddle/framework/variable.h" #include "paddle/fluid/framework/variable.h"
#include "paddle/platform/macros.h" #include "paddle/fluid/platform/macros.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/scope.h" #include "paddle/fluid/framework/scope.h"
#include "glog/logging.h" #include "glog/logging.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -10,8 +10,8 @@ See the License for the specific language governing permissions and ...@@ -10,8 +10,8 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
namespace paddle { namespace paddle {
......
...@@ -11,9 +11,9 @@ distributed under the License is distributed on an "AS IS" BASIS, ...@@ -11,9 +11,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/shape_inference.h" #include "paddle/fluid/framework/shape_inference.h"
#include "grad_op_desc_maker.h" #include "grad_op_desc_maker.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -14,9 +14,9 @@ limitations under the License. */ ...@@ -14,9 +14,9 @@ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/attribute.h" #include "paddle/fluid/framework/attribute.h"
#include "paddle/framework/ddim.h" #include "paddle/fluid/framework/ddim.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
namespace paddle { namespace paddle {
namespace framework {} namespace framework {}
......
...@@ -20,12 +20,12 @@ limitations under the License. */ ...@@ -20,12 +20,12 @@ limitations under the License. */
#include <typeindex> #include <typeindex>
#include <vector> #include <vector>
#include "paddle/framework/data_layout.h" #include "paddle/fluid/framework/data_layout.h"
#include "paddle/framework/ddim.h" #include "paddle/fluid/framework/ddim.h"
#include "paddle/memory/memory.h" #include "paddle/fluid/memory/memory.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
#include "paddle/platform/place.h" #include "paddle/fluid/platform/place.h"
namespace paddle { namespace paddle {
...@@ -224,4 +224,4 @@ inline void Tensor::switch_place(platform::Place new_place) { ...@@ -224,4 +224,4 @@ inline void Tensor::switch_place(platform::Place new_place) {
} // namespace framework } // namespace framework
} // namespace paddle } // namespace paddle
#include "paddle/framework/tensor_impl.h" #include "paddle/fluid/framework/tensor_impl.h"
...@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and ...@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include "paddle/memory/memcpy.h" #include "paddle/fluid/memory/memcpy.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <string> #include <string>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/tensor_util.h" #include "paddle/fluid/framework/tensor_util.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
./tensor_util.cc
\ No newline at end of file
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "paddle/fluid/framework/tensor_util.h"
namespace paddle {
namespace framework {
template <typename Predicate, typename DevCtx>
struct AnyDTypeVisitor {
Predicate predicate_;
const Tensor& tensor_;
const DevCtx& ctx_;
Tensor* out_;
AnyDTypeVisitor(Predicate predicate, const Tensor& tensor, const DevCtx& ctx,
Tensor* out)
: predicate_(predicate), tensor_(tensor), ctx_(ctx), out_(out) {}
template <typename T>
void operator()() const {
auto t = EigenVector<T>::Flatten(tensor_);
auto o = EigenScalar<bool>::From(*out_);
// return any of predicate_(t) is true.
o.device(*ctx_.eigen_device()) = predicate_(t).any();
}
};
template <typename Predicate, typename DevCtx>
inline void AnyImpl(Predicate predicate, const framework::Tensor& tensor,
const DevCtx& ctx, framework::Tensor* out) {
VisitDataType(ToDataType(tensor.type()), AnyDTypeVisitor<Predicate, DevCtx>(
predicate, tensor, ctx, out));
}
template <typename Predicate>
struct AnyVisitor : public boost::static_visitor<bool> {
const framework::Tensor& tensor_;
Predicate predicate_;
AnyVisitor(const framework::Tensor& tensor, Predicate predicate)
: tensor_(tensor), predicate_(std::move(predicate)) {}
template <typename Place>
bool operator()(const Place& place) const {
framework::Tensor out;
out.Resize({1});
out.mutable_data<bool>(place);
auto* ctx = platform::DeviceContextPool::Instance().GetByPlace(place);
AnyImpl(predicate_, tensor_, *ctx, &out);
return this->GetResult(out, place);
}
bool GetResult(const framework::Tensor& out,
const platform::CUDAPlace& gpu) const {
platform::CPUPlace cpu;
framework::Tensor tmp;
tmp.Resize({1});
tmp.mutable_data<bool>(cpu);
auto gpuctx = platform::DeviceContextPool::Instance().Get(gpu);
gpuctx->Wait();
Copy(out, cpu, *gpuctx, &tmp);
gpuctx->Wait();
return GetResult(tmp, cpu);
}
bool GetResult(const framework::Tensor& out,
const platform::CPUPlace& cpu) const {
return *out.data<bool>();
}
};
template <typename Predicate>
inline bool Any(const framework::Tensor& tensor, Predicate predicate) {
AnyVisitor<Predicate> visitor(tensor, predicate);
auto place = tensor.place();
return platform::VisitPlace(place, visitor);
}
struct HasNANPredicate {
template <typename T>
auto operator()(const T& eigen_vec) const
-> decltype(std::declval<T>().isnan()) {
// Cast eigen_vector to vector of bool. true if is inf.
return eigen_vec.isnan();
}
};
bool HasNAN(const framework::Tensor& tensor) {
HasNANPredicate predicate;
return Any(tensor, predicate);
}
struct HasInfPredicate {
template <typename T>
auto operator()(const T& eigen_vec) const
-> decltype(std::declval<T>().isinf()) {
// Cast eigen_vector to vector of bool. true if is inf.
return eigen_vec.isinf();
}
};
bool HasInf(const framework::Tensor& tensor) {
HasInfPredicate predicate;
return Any(tensor, predicate);
}
} // namespace framework
} // namespace paddle
...@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and ...@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/data_type.h" #include "paddle/fluid/framework/data_type.h"
#include "paddle/framework/eigen.h" #include "paddle/fluid/framework/eigen.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/framework/tensor.h" #include "paddle/fluid/framework/tensor.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#include "paddle/framework/tensor_util.h" #include "paddle/fluid/framework/tensor_util.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <cmath> #include <cmath>
#include <string> #include <string>
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
limitations under the License. */ limitations under the License. */
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/tensor_util.h" #include "paddle/fluid/framework/tensor_util.h"
#include "paddle/platform/device_context.h" #include "paddle/fluid/platform/device_context.h"
#include "paddle/platform/place.h" #include "paddle/fluid/platform/place.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/threadpool.h" #include "paddle/fluid/framework/threadpool.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -22,8 +22,8 @@ limitations under the License. */ ...@@ -22,8 +22,8 @@ limitations under the License. */
#include <thread> #include <thread>
#include <vector> #include <vector>
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
#include "paddle/platform/macros.h" // for DISABLE_COPY_AND_ASSIGN #include "paddle/fluid/platform/macros.h" // for DISABLE_COPY_AND_ASSIGN
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -20,7 +20,7 @@ limitations under the License. */ ...@@ -20,7 +20,7 @@ limitations under the License. */
#include <unordered_map> #include <unordered_map>
#include <unordered_set> #include <unordered_set>
#include <vector> #include <vector>
#include "paddle/platform/variant.h" #include "paddle/fluid/platform/variant.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/var_desc.h" #include "paddle/fluid/framework/var_desc.h"
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -16,7 +16,7 @@ limitations under the License. */ ...@@ -16,7 +16,7 @@ limitations under the License. */
#include <vector> #include <vector>
#include "glog/logging.h" #include "glog/logging.h"
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -13,13 +13,13 @@ See the License for the specific language governing permissions and ...@@ -13,13 +13,13 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/framework.pb.h" #include "paddle/fluid/framework/framework.pb.h"
#include "paddle/framework/lod_rank_table.h" #include "paddle/fluid/framework/lod_rank_table.h"
#include "paddle/framework/lod_tensor.h" #include "paddle/fluid/framework/lod_tensor.h"
#include "paddle/framework/lod_tensor_array.h" #include "paddle/fluid/framework/lod_tensor_array.h"
#include "paddle/framework/reader.h" #include "paddle/fluid/framework/reader.h"
#include "paddle/framework/selected_rows.h" #include "paddle/fluid/framework/selected_rows.h"
#include "paddle/framework/variable.h" #include "paddle/fluid/framework/variable.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and ...@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#pragma once #pragma once
#include "paddle/framework/type_defs.h" #include "paddle/fluid/framework/type_defs.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "paddle/framework/var_type_inference.h" #include "paddle/fluid/framework/var_type_inference.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/framework/op_registry.h" #include "paddle/fluid/framework/op_registry.h"
#include "paddle/framework/operator.h" #include "paddle/fluid/framework/operator.h"
#include "paddle/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <typeindex> #include <typeindex>
#include <typeinfo> #include <typeinfo>
#include "paddle/platform/enforce.h" #include "paddle/fluid/platform/enforce.h"
namespace paddle { namespace paddle {
namespace framework { namespace framework {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册