如果这个步骤都需要海量的算力这不是浪费电这是什么
=== GPU Memory Bandwidth Test ===
Array size: 512 MB
Iterations: 20
Total time: 27.0758 ms
Measured bandwidth: 738.667 GB/s
当前模型为何“傻”?
1. 没有操作系统心智模型(OS Mental Model)
- 模型知道“文件”这个概念,但不理解文件系统是可操作的实体。
- 它可能认为“创建文件”是一个原子 API 调用(如
open("new.txt", "w")),而想不到用已有工具组合达成目的。 - 缺乏“工具链思维”:不知道
cp、cat /dev/null >、mv等命令可组合解决“创建”问题。
2. 无法进行“替代性推理”(Alternative Reasoning)
- 当首选方案失败(如权限不足无法
touch new.txt),不会自动想“那我换个方式?” - 人类会立刻想到:“既然不能新建,那我改个旧的总行吧?”
- 模型却卡在“任务失败”状态,缺乏备选路径生成能力。
3. 训练数据偏向“理想化指令”
- 大模型在海量代码中学习到的是“标准做法”(
f = open("file", "w")),而不是“在限制条件下绕过问题”。 - 真实世界的“hack”和“workaround”很少出现在公开代码库中,所以模型没学过。
- 老架构明明可以用,统一换新用软件限制硬件,硬件在限制软件
- 都他丫的泡沫
- Mojo 0.25.7.0.dev2025110405 (2114fc9b)
- (gpu-intro) boreaman@boreaman-X99-TI-D3-PLUS:~/桌面/ai/gpu-hello/gpu-intro$ # Mojo 新版本可能使用这种方式
- mojo build vector-add.mojo –gpu
- mojo: error: unrecognized argument ‘–gpu’
- (gpu-intro) boreaman@boreaman-X99-TI-D3-PLUS:~/桌面/ai/gpu-hello/gpu-intro$ mojo repl # 启动交互式 REPL
- Welcome to Mojo! 🔥
- Expressions are delimited by a blank line.
- Type
:quitto exit the REPL and:mojo helpfor further assistance. - 1> from gpu.host import DeviceContext
- from sys import has_accelerator
- def main():
- @parameter
- if not has_accelerator():
- print(“No compatible GPU found”)
- else:
- ctx = DeviceContext()
- print(“Found GPU:”, ctx.name())
- [71319:71320:20251105,133208.274096:ERROR directory_reader_posix.cc:42] opendir /home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/share/max/crashdb/attachments/4088df60-dd43-46b2-afdb-e3251efa395b: No such file or directory (2)
- LLDB diagnostics will be written to /tmp/diagnostics-a51248
- Please include the directory content when filing a bug report
- PLEASE submit a bug report to and include the crash backtrace.
- [User] Backtrace:
- #0 0x0000783b0fc1aaeb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x661aaeb)
- #1 0x0000783b0c2ccae6 dumpTraceOnSignal(void) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x2cccae6) #2 0x0000783b0fc18306 llvm::sys::RunSignalHandlers() (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x6618306) #3 0x0000783b0fc1b647 SignalHandler(int, siginfo_t, void*) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x661b647)
- #4 0x0000783b20a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
- #5 0x0000783b0e0f2817 mlir::Attribute::getContext() const (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4af2817)
- #6 0x0000783b0e13fa0d emitDiag(mlir::Location, mlir::DiagnosticSeverity, llvm::Twine const&) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4b3fa0d)
- #7 0x0000783b0e13f9a0 mlir::emitError(mlir::Location) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4b3f9a0)
- #8 0x0000783b0c617771 mlir::InFlightDiagnostic llvm::function_ref::callback_fn>)::$_1::operator()() const::’lambda'(mlir::Location)>(long, mlir::Location) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3017771)
- #9 0x0000783b0d2d53cf M::ErrorTree::emit(llvm::function_ref, llvm::StringRef, bool, std::optional) && (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3cd53cf)
- 10 0x0000783b0c6176fa mlir::InFlightDiagnostic llvm::function_ref::callback_fn>)::$_1>(long) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x30176fa)
- 11 0x0000783b0d2d4b1c M::emitLimitedError(llvm::function_ref, M::ErrorLimit&) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3cd4b1c)
- 12 0x0000783b0c60284c M::KGEN::Elaborator::run(mlir::ModuleOp, llvm::ArrayRef>) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x300284c)
- 13 0x0000783b0c60fa1b (anonymous namespace)::ElaborateGeneratorsPass::runOnOperation() (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x300fa1b)
- 14 0x0000783b0e0893eb mlir::detail::OpToOpPassAdaptor::run(mlir::Pass, mlir::Operation, mlir::AnalysisManager, bool, unsigned int) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4a893eb)
- 15 0x0000783b0e08c160 mlir::PassManager::run(mlir::Operation*) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4a8c160)
- 16 0x0000783b0c66649d void llvm::detail::UniqueFunctionBase::CallImpl, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_0::operator()(mlir::Operation, M::RCRef, M::AsyncRT::AnyAsyncValueRef) const::’lambda'(M::AsyncRT::AnyAsyncValueRef&&)>(void*, M::AsyncRT::AnyAsyncValueRef&) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x306649d)
- 17 0x0000783b0c483d57 void M::AsyncRT::AnyAsyncValueRef::andThen(llvm::unique_function&&) && (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x2e83d57)
- 18 0x0000783b0c66609b M::AsyncRT::AnyAsyncValueRef llvm::detail::UniqueFunctionBase, M::AsyncRT::AnyAsyncValueRef>::CallImpl>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_0, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_1>(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, M::RCRef, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_0&&, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_1&&, std::__cxx11::basic_string, std::allocator>)::’lambda'(M::RCRef, M::AsyncRT::AnyAsyncValueRef)>(void, M::RCRef&, M::AsyncRT::AnyAsyncValueRef&) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x306609b)
- 19 0x0000783b0c665b9d void llvm::detail::UniqueFunctionBase>>&&>::CallImpl>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_0, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_1>(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, M::RCRef, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_0&&, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_1&&, std::__cxx11::basic_string, std::allocator>)::’lambda'(M::RCRef, M::AsyncRT::AnyAsyncValueRef)>(M::AsyncRT::EncodedLocation, M::RCRef> const&, M::AsyncRT::AnyAsyncValueRef, M::RCRef, M::Cache::cachedTransform(mlir::Operation, M::RCRef>, M::AsyncRT::AnyAsyncValueRef, mlir::PassManager&, std::function const&, std::function const&)::$_0, llvm::unique_function)>, bool, std::__cxx11::basic_string, std::allocator>)::’lambda'(M::AsyncRT::AsyncValueRef>>&&)>(void, M::AsyncRT::AsyncValueRef>>&) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3065b9d)
- 20 0x0000783b0d2890e3 void (anonymous namespace)::WorkQueueThread::runItemsImpl<(anonymous namespace)::WorkQueueThread::runOnThread()::$_0, (anonymous namespace)::WorkQueueThread::runOnThread()::$_1>((anonymous namespace)::WorkQueueThread::runOnThread()::$_0, (anonymous namespace)::WorkQueueThread::runOnThread()::$_1, bool, llvm::StringLiteral, llvm::StringLiteral) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3c890e3)
- 21 0x0000783b0d288f45 (anonymous namespace)::WorkQueueThread::runOnThread() (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3c88f45)
- 22 0x0000783b28f8128c execute_native_thread_routine /home/conda/feedstock_root/build_artifacts/gcc_compilers_1759960648650/work/build/x86_64-conda-linux-gnu/libstdc++-v3/src/c++11/../../../../../libstdc++-v3/src/c++11/thread.cc:106:5
- 23 0x0000783b20a94ac3 start_thread ./nptl/pthread_create.c:442:8
- 24 0x0000783b20b268c0 ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:83:0
- #0 0x0000606a616808fb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/bin/mojo-lldb+0x358fb)
- #1 0x0000606a6167e55a llvm::sys::RunSignalHandlers() (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/bin/mojo-lldb+0x3355a)
- #2 0x0000606a61681777 SignalHandler(int, siginfo_t, void) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/bin/mojo-lldb+0x36777)
- #3 0x0000783b20a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
- #4 0x0000783b20b1e8fd syscall ./misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S:38:0
- #5 0x0000783b28790353 SignalHandler(int, siginfo_t, void) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/bin/../lib/liblldb22.0.0git.so+0x7990353)
- #6 0x0000783b20a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
- #7 0x0000783b20b1e8fd syscall ./misc/../sysdeps/unix/sysv/linux/x86_64/syscall.S:38:0
- #8 0x0000783b0fc1b673 SignalHandler(int, siginfo_t, void) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x661b673)
- #9 0x0000783b20a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
- 10 0x0000783b0e0f2817 mlir::Attribute::getContext() const (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4af2817)
- 11 0x0000783b0e13fa0d emitDiag(mlir::Location, mlir::DiagnosticSeverity, llvm::Twine const&) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4b3fa0d)
- 12 0x0000783b0e13f9a0 mlir::emitError(mlir::Location) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x4b3f9a0)
- 13 0x0000783b0c617771 mlir::InFlightDiagnostic llvm::function_ref::callback_fn>)::$_1::operator()() const::’lambda'(mlir::Location)>(long, mlir::Location) (/home/boreaman/桌面/ai/gpu-hello/gpu-intro/.pixi/envs/default/lib/libMojoLLDB.so+0x3017771)
- 14 0x0000783b0d2d53cf M::ErrorTree::emit(llvm::function_ref<mlir::InFlightDiag