机器学习PAI用的镜像是这个 alideeprec/deeprec-build:deeprec-dev-gpu-py38-cu116-ubuntu20.04
https://deeprec.readthedocs.io/zh/latest/DeepRec-Compile-And-Install.html根据这个文档编译了 libserving_processor.so 用python调用的时候,initialize 这一步发生了segment fault
配置的config如下 { “session_num”: 1, “select_session_policy”: “RR”, “use_per_session_threads”: false, “cpusets”: “0,1,2,3”, “gpu_ids_list”: “0”, “use_multi_stream”: false, “enable_device_placement_optimization”: false, “enable_inline_execute”: false, “omp_num_threads”: 1, “kmp_blocktime”: 0, “feature_store_type”: “local”, “serialize_protocol”: “protobuf”, “inter_op_parallelism_threads”: 1, “intra_op_parallelism_threads”: 1, “model_update_inter_threads”: 1, “model_update_intra_threads”: 1, “init_timeout_minutes”: 1, “signature_name”: “serving_default”, “warmup_file_name”: “”, “model_store_type”: “local”, “checkpoint_dir”: “/app/llm/project/hupu/test/models/train_mmoe/result/”, “savedmodel_dir”: “/app/llm/project/hupu/test/models/train_mmoe/model/00123/”, “timeline_start_step”: 1, “timeline_interval_step”: 2, “timeline_trace_count”: 3, “timeline_path”: “/app/llm/project/hupu/test/timeline”, “ev_storage_type”: 0}调用的python代码如下 from ctypes import cdll, c_char_p, c_int, POINTER, c_void_pimport jsonimport pdb# 加载.so文件lib = cdll.LoadLibrary(‘./lib/libserving_processor.so’)# 设置initialize函数的参数类型和返回值类型lib.initialize.argtypes = [c_char_p, c_char_p, POINTER(c_int)]lib.initialize.restype = c_void_p# 设置process函数的参数类型和返回值类型lib.process.argtypes = [c_void_p, c_void_p, c_int, POINTER(c_void_p), POINTER(c_int)]lib.process.restype = c_int# 设置get_serving_model_info函数的参数类型和返回值类型lib.get_serving_model_info.argtypes = [c_void_p, POINTER(c_void_p), POINTER(c_int)]lib.get_serving_model_info.restype = c_int# 调用initialize函数with open(‘./lib/model_cfg.json’) as f: cfg_data = json.load(f)json_str = json.dumps(cfg_data)cfg_bytes = json_str.encode(‘utf-8′)# pdb.set_trace()state = c_int()model_buf = lib.initialize(b’model_entry’, cfg_bytes, state)print(“initial state: %d”.format(state))pdb.set_trace()麻烦问下这个错误是啥原因呀 ?请问有没有使用python调用这个so的示例文档呢?