Skip to content
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

apps/fft benchmark fails for GPU targets at 12x12 or larger #7033

Closed
steven-johnson opened this issue Sep 20, 2022 · 2 comments
Closed

apps/fft benchmark fails for GPU targets at 12x12 or larger #7033

steven-johnson opened this issue Sep 20, 2022 · 2 comments
Assignees
Labels

Comments

@steven-johnson
Copy link
Contributor

Run apps/fft/bench_fft at 12x12 or larger, using a GPU target (e.g., host-metal), and fail; on OSX, the error was

bench_fft(9110,0x1048f9600) malloc: *** error for object 0xffffffffffffffff: pointer being freed was not allocated
bench_fft(9110,0x1048f9600) malloc: *** set a breakpoint in malloc_error_break to debug
@steven-johnson
Copy link
Contributor Author

Debugging further, the metal case is crashing inside LLVM:

    frame #3: 0x000000010f7e6b86 libHalide.dylib`llvm::slpvectorizer::BoUpSLP::getEntryCost(llvm::slpvectorizer::BoUpSLP::TreeEntry const*, llvm::ArrayRef<llvm::Value*>) + 20118
    frame #4: 0x000000010f7ebff5 libHalide.dylib`llvm::slpvectorizer::BoUpSLP::getTreeCost(llvm::ArrayRef<llvm::Value*>) + 1013
    frame #5: 0x000000010f806b1e libHalide.dylib`llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) + 3118
    frame #6: 0x000000010f80b51c libHalide.dylib`llvm::SLPVectorizerPass::vectorizeInsertElementInst(llvm::InsertElementInst*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) + 556
    frame #7: 0x000000010f80b73c libHalide.dylib`llvm::SLPVectorizerPass::vectorizeSimpleInstructions(llvm::SmallSetVector<llvm::Instruction*, 8u>&, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, bool) + 508
    frame #8: 0x000000010f802ac4 libHalide.dylib`llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) + 3620
    frame #9: 0x000000010f80106c libHalide.dylib`llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) + 2012
    frame #10: 0x000000010f800444 libHalide.dylib`llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 996
    frame #11: 0x000000010f3ecbf2 libHalide.dylib`llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 18
    frame #12: 0x00000001105f9c3b libHalide.dylib`llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 347
    frame #13: 0x000000010e401152 libHalide.dylib`llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 18
    frame #14: 0x00000001105fe8dc libHalide.dylib`llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 492
    frame #15: 0x000000010e400f32 libHalide.dylib`llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 18
    frame #16: 0x00000001105f8e7b libHalide.dylib`llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 347
    frame #17: 0x000000010c8de09a libHalide.dylib`Halide::Internal::CodeGen_LLVM::optimize_module(this=0x0000000100f2de50) at CodeGen_LLVM.cpp:1249:9

@steven-johnson
Copy link
Contributor Author

Issues doesn't occur in LLVM15. Going to try to bisect in LLVM16 to see if it's an injection from upstream. (Could have been there for a while, as our buildbots had been mistakenly not testing this for, uh, a while)

@steven-johnson steven-johnson self-assigned this Sep 20, 2022
steven-johnson added a commit that referenced this issue Sep 20, 2022
Want to avoid reporting this known bug while fix is investigated
steven-johnson added a commit that referenced this issue Sep 20, 2022
Want to avoid reporting this known bug while fix is investigated
steven-johnson added a commit that referenced this issue Sep 21, 2022
Revert "Temporarily disable testing for apps/fft (#7033) (#7035)"

This reverts commit 48d56d8.
ardier pushed a commit to ardier/Halide-mutation that referenced this issue Mar 3, 2024
Want to avoid reporting this known bug while fix is investigated
ardier pushed a commit to ardier/Halide-mutation that referenced this issue Mar 3, 2024
…de#7040)

Revert "Temporarily disable testing for apps/fft (halide#7033) (halide#7035)"

This reverts commit 48d56d8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant