siliconflow / onediff

OneDiff: An out-of-the-box acceleration library for diffusion models.
https://github.com/siliconflow/onediff/wiki
Apache License 2.0
1.4k stars 85 forks source link

OP Kernel Not Found Error #974

Open paulpanwang opened 1 week ago

paulpanwang commented 1 week ago

Describe the bug

A clear and concise description of what the bug is.

Cannot find the kernel matching Current OperatorConf. The Info of OperatorConf are op_name: model.mid_block.attentions.0.transformer_blocks.0.attn2.to_v-broadcast_matmul-1080 op_type_name: broadcast_matmul DeviceType_Name: kCPU DataType_Name of b_0: kFloat16 DataType_Name of a_0: kFloat16 DataType_Name of out_0: kFloat16 File "oneflow/core/job/job_interpreter.cpp", line 325, in InterpretJob RunNormalOp(launch_context, launch_op, inputs) File "oneflow/core/job/job_interpreter.cpp", line 237, in RunNormalOp it.Apply(op, inputs, &outputs, OpExprInterpContext(empty_attr_map, JUST(launch_op.device))) File "oneflow/core/framework/op_interpreter/eager_local_op_interpreter.cpp", line 155, in NaiveInterpret PhysicalRun([&](InstructionsBuilder builder) -> Maybe ... output_eager_blob_objects), ctx, result->stream()); }) File "oneflow/core/framework/instructions_builder.h", line 168, in PhysicalRun Build(&instructions_builder) File "oneflow/core/framework/instructions_builder.cpp", line 400, in Call vm::OpCallInstructionPolicy::New( vm_stream, opkernel ... global_tensor_infer_result, ctx, *one::CurrentDevVmDepObjectConsumeMode()) File "oneflow/core/vm/op_call_instruction_policy.h", line 50, in New ptr->Init() File "oneflow/user/kernels/stateful_opkernel.cpp", line 920, in ChooseOpKernel user_op::UserOpRegistryMgr::Get().GetOpKernelRegistryResult(op_type_name, reg_ctx) Error Type: oneflow.ErrorProto.op_kernel_not_found_error

Your environment

OS

OneDiff git commit id

OneFlow version info

Run python -m oneflow --doctor and paste it here. version: 0.9.1.dev20240515+cu118 git_commit: ec7b682 cmake_build_type: Release rdma: True mlir: True enterprise: False

How To Reproduce

Steps to reproduce the behavior(code or script):

The complete error message

Additional context

Add any other context about the problem here.

marigoold commented 1 week ago

it seems you run your model on CPU instead of CUDA: DeviceType_Name: kCPU