DeepLink-org / deeplink.framework

BSD 3-Clause "New" or "Revised" License
55 stars 28 forks source link

deeplink开发请求帮助 #900

Closed MiaoYYu closed 1 month ago

MiaoYYu commented 1 month ago

你好,我在开发deleplink的时候遇到了一个问题一直不能解决,您能帮忙看看是什么问题吗?

我在/home/deeplink/deeplink.framework/dipu/third_party/DIOPI/impl里面编译好了共享库libdiopi_impl.so,so里面只实现了这么一段代码

#include <diopi/functions.h>
#include <math.h>
#include <cstring>
#include "../musa_pytorch.h"
// #include "../common/common.hpp"

namespace impl {
namespace musa {
static const char* name = "MUSADevice";
DIOPI_RT_API const char* diopiGetVendorName() { return name; }
DIOPI_API diopiError_t diopiAdd(diopiContextHandle_t ctx, diopiTensorHandle_t out, diopiConstTensorHandle_t input, diopiConstTensorHandle_t other,
                                const diopiScalar_t* alpha) {
    std::cout << "==================diopiAdd===========================\n";
    return diopiSuccess;
}

但是 在打开python之后就是不能调用我写的算子,说我回退到cpu端了,如下

import torch,torch_dipu,os

dipu device will show as cuda device. if it's not expected behavior, please set env DIPU_PYTHON_DEVICE_AS_CUDA=false

Wed Jul 17 16:01:46 2024 dipu | git hash:fdc1b4c1-dirty

::diopiFill 01 is not yet implemented, fill_.Scalar will be fallback to cpu

::diopiAddScalar 01 is not yet implemented, add.Scalar_out will be fallback to cpu

::diopiAddInpScalar 01 is not yet implemented, add_.Scalar will be fallback to cpu

::diopiAddInp 01 is not yet implemented, add_.Tensor will be fallback to cpu

::diopiAdd 01 is not yet implemented, add.out will be fallback to cpu

::diopiAdd 01 is not yet implemented, add.Tensor will be fallback to cpu

您看您能帮忙看看吗

MiaoYYu commented 1 month ago

重复提交,可以查看issue:https://github.com/DeepLink-org/deeplink.framework/issues/901。 此issue关闭