-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scalehls fails resnet test #4
Comments
I ran everything again, reinstalled things, ran into the same issue:
scalehls-opt: /home/johnkan/scale_test2/scalehls-hida/lib/Dialect/HLS/Utils.cpp:514: mlir::LogicalResult mlir::scalehls::getEvenlyDistributedFactors(unsigned int, mlir::scalehls::FactorList &, const SmallVectorImplmlir::AffineForOp &, const SmallVectorImplmlir::scalehls::FactorList &, bool): Assertion `tripCount.value() % constrFactors[loop.index()] == 0 && "contraint factor isn't divisor of corresponding trip count"' failed. |
Is this issue resolved now? |
I encountered almost the same issue as @john-kan-2 when I was trying to reproduce the C++ code. I noted that torch-mlir has been constantly updating and the API Build EnvironmentUbuntu 24.04 LTS-Linux version 6.8.0-45-generic Option: -p ON -j 8 To Reproduce
requirements.txt
Command:
Error Message
Stack Dump
|
Running:
$ scalehls-opt resnet18.mlir -hida-pytorch-pipeline="top-func=forward loop-tile-size=8 loop-unroll-factor=4" | scalehls-translate -scalehls-emit-hlscpp > resnet18.cpp
I am using Ubuntu-22.04 (WSL2), python3.8 with python binding for the build script. I had to lower the mpmath version (due to a compilation issue) to 1.3.0 from the current 1.4.*.
I am left this with this dump:
scalehls-opt: /home/johnkan/scale_test1/scalehls-hida/lib/Dialect/HLS/Utils.cpp:514: mlir::LogicalResult mlir::scalehls::getEvenlyDistributedFactors(unsigned int, mlir::scalehls::FactorList &, const SmallVectorImplmlir::AffineForOp &, const SmallVectorImplmlir::scalehls::FactorList &, bool): Assertion `tripCount.value() % constrFactors[loop.index()] == 0 && "contraint factor isn't divisor of corresponding trip count"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: scalehls-opt resnet18.mlir "-hida-pytorch-pipeline=top-func=forward loop-tile-size=8 loop-unroll-factor=4"
#0 0x0000560cbb638a4a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/llvm/lib/Support/Unix/Signals.inc:569:11
#1 0x0000560cbb638bfb PrintStackTraceSignalHandler(void*) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/llvm/lib/Support/Unix/Signals.inc:636:1
#2 0x0000560cbb637246 llvm::sys::RunSignalHandlers() /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/llvm/lib/Support/Signals.cpp:104:5
#3 0x0000560cbb639325 SignalHandler(int) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
#4 0x00007fc33583e520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007fc3358929fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0x00007fc3358929fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#7 0x00007fc3358929fc pthread_kill ./nptl/pthread_kill.c:89:10
#8 0x00007fc33583e476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#9 0x00007fc3358247f3 abort ./stdlib/abort.c:81:7
#10 0x00007fc33582471b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#11 0x00007fc335835e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#12 0x0000560cb99a0cf1 mlir::scalehls::getEvenlyDistributedFactors(unsigned int, llvm::SmallVector<unsigned int, 8u>&, llvm::SmallVectorImplmlir::AffineForOp const&, llvm::SmallVectorImpl<llvm::SmallVector<unsigned int, 8u>> const&, bool) /home/johnkan/scale_test1/scalehls-hida/lib/Dialect/HLS/Utils.cpp:515:7
#13 0x0000560cba4ec3c6 (anonymous namespace)::ParallelizeDataflowNode::applyCorrelationAwareUnroll(mlir::func::FuncOp) /home/johnkan/scale_test1/scalehls-hida/lib/Transforms/Dataflow/ParallelizeDataflowNode.cpp:276:18
#14 0x0000560cba4eb5f7 (anonymous namespace)::ParallelizeDataflowNode::runOnOperation() /home/johnkan/scale_test1/scalehls-hida/lib/Transforms/Dataflow/ParallelizeDataflowNode.cpp:325:7
#15 0x0000560cbb16524a mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:462:21
#16 0x0000560cbb165844 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:525:16
#17 0x0000560cbb16acf8 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:745:36
#18 0x0000560cbb16a969 mlir::LogicalResult mlir::failableParallelForEach<__gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocatormlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&>(mlir::MLIRContext*, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocatormlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>, __gnu_cxx::__normal_iterator<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocatormlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/include/mlir/IR/Threading.h:46:18
#19 0x0000560cbb166b23 mlir::LogicalResult mlir::failableParallelForEach<std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocatormlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>&, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&>(mlir::MLIRContext*, std::vector<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo, std::allocatormlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo>&, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/include/mlir/IR/Threading.h:92:10
#20 0x0000560cbb1663c6 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:755:14
#21 0x0000560cbb1654f7 mlir::detail::OpToOpPassAdaptor::runOnOperation(bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:646:5
#22 0x0000560cbb16523b mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:459:5
#23 0x0000560cbb165844 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:525:16
#24 0x0000560cbb16710c mlir::PassManager::runPasses(mlir::Operation*, mlir::AnalysisManager) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:828:10
#25 0x0000560cbb16702c mlir::PassManager::run(mlir::Operation*) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Pass/Pass.cpp:808:60
#26 0x0000560cba3b2a22 performActions(llvm::raw_ostream&, bool, bool, llvm::SourceMgr&, mlir::MLIRContext*, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, bool, bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:91:17
#27 0x0000560cba3b2689 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, bool, bool, bool, bool, bool, bool, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, llvm::ThreadPool*) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:139:12
#28 0x0000560cba3b2468 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::raw_ostream&) const /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:181:12
#29 0x0000560cba3b235d mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::raw_ostream&) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:12
#30 0x0000560cbb4b4819 llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::raw_ostream&)>::operator()(std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::raw_ostream&) const /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:12
#31 0x0000560cbb4b3df5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::function_ref<mlir::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Support/ToolUtilities.cpp:28:12
#32 0x0000560cba3b13c3 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:186:10
#33 0x0000560cba3b155f mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_deletellvm::MemoryBuffer>, mlir::PassPipelineCLParser const&, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool, bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:209:10
#34 0x0000560cba3b2177 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) /home/johnkan/scale_test1/scalehls-hida/polygeist/llvm-project/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp:306:14
#35 0x0000560cb7dbb1fc main /home/johnkan/scale_test1/scalehls-hida/tools/scalehls-opt/scalehls-opt.cpp:16:23
#36 0x00007fc335825d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#37 0x00007fc335825e40 call_init ./csu/../csu/libc-start.c:128:20
#38 0x00007fc335825e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#39 0x0000560cb7dbb0c5 _start (/home/johnkan/scale_test1/scalehls-hida/build/bin/scalehls-opt+0x1ee00c5)
The text was updated successfully, but these errors were encountered: