未验证 提交 575cafb4 编写于 作者: L lishicheng1996 提交者: GitHub

support custom device on macos (#52620)

上级 3cbcaf1a
......@@ -14,7 +14,12 @@
#pragma once
#if defined(__APPLE__)
#include <mach/error.h>
#else
#include <error.h>
#endif
#include <string>
#include "paddle/fluid/distributed/collective/types.h"
......
......@@ -13,7 +13,7 @@
// limitations under the License.
#pragma once
#if !defined(_WIN32) && !defined(__APPLE__)
#if !defined(_WIN32)
#include <cstddef>
#include <cstring>
......
......@@ -655,7 +655,11 @@ void DeviceManager::Clear() {
std::vector<std::string> ListAllLibraries(const std::string& library_dir) {
std::vector<std::string> libraries;
#if defined(__APPLE__)
std::regex express(".*\\.dylib");
#else
std::regex express(".*\\.so");
#endif
std::match_results<std::string::iterator> results;
#if !defined(_WIN32)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册