Issues with plot_fpga_lenet.py
ruck314 opened this issue · 2 comments
ruck314 commented
I am getting the following errors when I run the example/plot_fpga_lenet.py using the current master branch:
$ python examples/plot_fpga_lenet.py
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONRelu_11" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONMaxPool_12" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "input" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONRelu_14" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONMaxPool_15" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONReshape_16" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONGemm_18" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONRelu_19" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONGemm_20" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONRelu_21" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "onnxCOLONCOLONGemm_22" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/validation.py:321: UserWarning: WARNING: Use of uninitialized transient "x" in state TestLeNet
warnings.warn('WARNING: Use of uninitialized transient "%s" in state %s' %
Traceback (most recent call last):
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/compiler.py", line 222, in configure_and_compile
_run_liveoutput("cmake --build . --config %s" % (Config.get('compiler', 'build_type')),
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/compiler.py", line 405, in _run_liveoutput
raise subprocess.CalledProcessError(process.returncode, command, output.getvalue())
subprocess.CalledProcessError: Command 'cmake --build . --config RelWithDebInfo' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/scripts/plot_fpga_lenet.py", line 76, in <module>
daceml_result = daceml_module(x)
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/daceml/torch/module.py", line 385, in forward
self.function = self._initialize_sdfg(actual_inputs)
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/daceml/torch/module.py", line 355, in _initialize_sdfg
self.compiled_function = function_generator(self, dummy_inputs)
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/daceml/torch/dispatchers/cpp_torch_extension.py", line 498, in register_and_compile_torch_extension
compiled, handle_ptr = compile_and_init_sdfgs(module, dummy_inputs)
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/daceml/torch/dispatchers/common.py", line 47, in compile_and_init_sdfgs
compiled: CompiledSDFG = module.dace_model.compile_and_init()
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/daceml/onnx/onnx_importer.py", line 452, in compile_and_init
compiled_sdfg = self.sdfg.compile()
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/sdfg/sdfg.py", line 2140, in compile
shared_library = compiler.configure_and_compile(program_folder, sdfg.name)
File "/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/compiler.py", line 231, in configure_and_compile
raise cgx.CompilationError('Compiler failure:\n' + ex.output)
dace.codegen.exceptions.CompilationError: Compiler failure:
Consolidate compiler generated dependencies of target TestLeNet_1
[ 16%] Building CXX object CMakeFiles/TestLeNet_1.dir/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/cpu/TestLeNet_1.cpp.o
In file included from /u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/dace.h:14,
from /afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/cpu/TestLeNet_1.cpp:2:
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/types.h: In constructor ‘dace::half::half(float)’:
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/types.h:94:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
94 | uint32_t x = *((uint32_t*)&f);
| ~^~~~~~~~~~~~~~
[ 33%] Building CXX object CMakeFiles/TestLeNet_1.dir/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp.o
In file included from /u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/copy.h:5,
from /u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/xilinx/device.h:8,
from /u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/fpga_device.h:5,
from /afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp:1:
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/types.h: In constructor ‘dace::half::half(float)’:
/u1/ruckman/anaconda3/envs/dace-ml-dev/lib/python3.9/site-packages/dace/codegen/../runtime/include/dace/types.h:94:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
94 | uint32_t x = *((uint32_t*)&f);
| ~^~~~~~~~~~~~~~
/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp: In function ‘void TestLeNet_0_0_0(const float*, const float*, const float*, const float*, const float*, const float*, const float*, const float*, const float*, const float*, const float*, const float*, const long long int*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*, float*)’:
/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp:575:243: error: ‘y_out’ was not declared in this scope
575 | if (((((b > 0) || (n0 > 0)) && (k_drain < p) && (m_drain < 576)) || ((k == (25 - 1)) && (m >= 0)) || (__bn0km_drain && (k_drain < p)))) {Y_pipe[p].push((((p == 0) || ((k_drain == (25 - 1)) && (! __bn0km_drain))) ? y_out[0] : forward_in.pop()));
| ^~~~~
/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp:843:263: error: ‘y_out’ was not declared in this scope
843 | if (((((b > 0) || (n0 > 0)) && (k_drain < p) && (m_drain < 64)) || ((k == (150 - 1)) && (m >= 0)) || (__bn0km_drain && (k_drain < p)))) {fpga_im2col_conv_1_Y_pipe[p].push((((p == 0) || ((k_drain == (150 - 1)) && (! __bn0km_drain))) ? y_out[0] : forward_in.pop()));
| ^~~~~
/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp:1086:248: error: ‘c_out’ was not declared in this scope; did you mean ‘b_out’?
1086 | if (((((n0 > 0) || (tm > 0)) && (k_drain < p) && (m_drain < 120)) || ((k == (256 - 1)) && (m >= 0)) || (__n0tmkm_drain && (k_drain < p)))) {C_pipe[p].push((((p == 0) || ((k_drain == (256 - 1)) && (! __n0tmkm_drain))) ? c_out[0] : forward_in.pop()));
| ^~~~~
| b_out
/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp:1199:259: error: ‘c_out’ was not declared in this scope; did you mean ‘b_out’?
1199 | if (((((n0 > 0) || (tm > 0)) && (k_drain < p) && (m_drain < 84)) || ((k == (120 - 1)) && (m >= 0)) || (__n0tmkm_drain && (k_drain < p)))) {fpga_gemm_1_C_pipe[p].push((((p == 0) || ((k_drain == (120 - 1)) && (! __n0tmkm_drain))) ? c_out[0] : forward_in.pop()));
| ^~~~~
| b_out
/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp:1312:257: error: ‘c_out’ was not declared in this scope; did you mean ‘b_out’?
1312 | if (((((n0 > 0) || (tm > 0)) && (k_drain < p) && (m_drain < 10)) || ((k == (84 - 1)) && (m >= 0)) || (__n0tmkm_drain && (k_drain < p)))) {fpga_gemm_2_C_pipe[p].push((((p == 0) || ((k_drain == (84 - 1)) && (! __n0tmkm_drain))) ? c_out[0] : forward_in.pop()));
| ^~~~~
| b_out
gmake[2]: *** [CMakeFiles/TestLeNet_1.dir/build.make:90: CMakeFiles/TestLeNet_1.dir/afs/slac.stanford.edu/u/re/ruckman/projects/daceml-dev/software/.dacecache/TestLeNet_1/src/xilinx/device/TestLeNet_0_0.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:630: CMakeFiles/TestLeNet_1.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
orausch commented
Thanks, I believe @TizianoDeMatteis is taking a look at this