Open KaIi-github opened 2 years ago
The problem may lie in the operating system. We used Ubuntu to generate the library function, so executing in Windows may cause problems. We will consider providing the docker file for compiling TVM in the future.
Thanks for answering! As you said, I changed to the ubuntu system and ran successfully.
Hello,Thank you for this great job! But I had a problem I couldn't solve while reproducing. My configuration: os: win11 python: 3.8 cuda: 10.1 pytorch: 1.8.1 tvm: 0.8.0
Traceback (most recent call last): File "D:/SoftwareFolder/CodeSoftware/Code/linshi/Pyraformer/single_step_main.py", line 319, in
main()
File "D:/SoftwareFolder/CodeSoftware/Code/linshi/Pyraformer/single_step_main.py", line 312, in main
index_name, best_metrics = train(model, optimizer, scheduler, opt, model_save_dir)
File "D:/SoftwareFolder/CodeSoftware/Code/linshi/Pyraformer/single_step_main.py", line 177, in train
train_likelihood, train_mse = train_epoch(model, training_data, optimizer, opt, epoch_i)
File "D:/SoftwareFolder/CodeSoftware/Code/linshi/Pyraformer/single_step_main.py", line 90, in train_epoch
mean_pre, sigma_pre = model(sequence)
File "D:\SoftwareFolder\CodeSoftware\Anaconda3\envs\tvm-build\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, kwargs) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\Pyraformer_SS.py", line 77, in forward enc_output = self.encoder(data) # get all_enc form Encoder in this py document File "D:\SoftwareFolder\CodeSoftware\Anaconda3\envs\tvm-build\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, *kwargs) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\Pyraformer_SS.py", line 51, in forward seqenc, = self.layers[i](seq_enc, mask) File "D:\SoftwareFolder\CodeSoftware\Anaconda3\envs\tvm-build\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(input, kwargs) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\Layers.py", line 183, in forward enc_output = self.slf_attn(enc_input) File "D:\SoftwareFolder\CodeSoftware\Anaconda3\envs\tvm-build\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl result = self.forward(*input, kwargs) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\PAM_TVM.py", line 60, in forward attn_weights = graph_mm_tvm(q, k, self.q_k_mask, self.k_q_mask, False, -1000000000) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\hierarchical_mm_tvm.py", line 260, in forward output = GraphMM._graph_mm(t1, t2, q_k_mask, k_q_mask, is_t1_diagonaled=is_t1_diagonaled, padding=padding) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\hierarchical_mm_tvm.py", line 190, in _graph_mm _graph_mm_function = GraphMM._get_function(dtype=dtype, device=device) File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\hierarchical_mm_tvm.py", line 151, in _get_function graph_mm = GraphMM._compile_function(dtype, device) # compile File "D:\SoftwareFolder\CodeSoftware\Code\linshi\Pyraformer\pyraformer\hierarchical_mm_tvm.py", line 113, in _compile_function graph_mm = tvm.build(s, [X, Y, Z, q_k_mask, k_q_mask, max_attn, padding, transpose_t1, t3d3], target=device, target_host=tgt_host, name='graph_mm') File "D:\SoftwareFolder\CodeSoftware\Anaconda3\envs\tvm-build\lib\site-packages\tvm-0.8.0-py3.8-win-amd64.egg\tvm\driver\build_module.py", line 270, in build rt_mod_host = _driver_ffi.preprocess_module(target_input_mod, target_host) File "D:\SoftwareFolder\CodeSoftware\Anaconda3\envs\tvm-build\lib\site-packages\tvm-0.8.0-py3.8-win-amd64.egg\tvm_ffi_ctypes\packed_func.py", line 237, in call raise get_last_ffi_error() tvm._ffi.base.TVMError: Traceback (most recent call last): File "D:\SoftwareFolder\CodeSoftware\environment\apache-tvm-src-v0.8.0.rc0\src\target\llvm\codegen_llvm.cc", line 313 TVMError: not implemented**
How to solve this problem?