@@ -805,10 +805,10 @@ pub(crate) unsafe fn llvm_optimize(
805805 if cgcx. target_is_like_gpu && config. offload . contains ( & config:: Offload :: Device ) {
806806 let device_path = cgcx. output_filenames . path ( OutputType :: Object ) ;
807807 let device_dir = device_path. parent ( ) . unwrap ( ) ;
808- let device_out = device_dir. join ( "host.out " ) ;
808+ let device_out = device_dir. join ( "device.bin " ) ;
809809 let device_out_c = path_to_c_string ( device_out. as_path ( ) ) ;
810810 unsafe {
811- // 1) Bundle device module into offload image host.out (device TM)
811+ // 1) Bundle device module into offload image device.bin (device TM)
812812 let ok = llvm:: LLVMRustBundleImages (
813813 module. module_llvm . llmod ( ) ,
814814 module. module_llvm . tm . raw ( ) ,
@@ -821,7 +821,7 @@ pub(crate) unsafe fn llvm_optimize(
821821 }
822822
823823 // This assumes that we previously compiled our kernels for a gpu target, which created a
824- // `host.out ` artifact. The user is supposed to provide us with a path to this artifact, we
824+ // `device.bin ` artifact. The user is supposed to provide us with a path to this artifact, we
825825 // don't need any other artifacts from the previous run. We will embed this artifact into our
826826 // LLVM-IR host module, to create a `host.o` ObjectFile, which we will write to disk.
827827 // The last, not yet automated steps uses the `clang-linker-wrapper` to process `host.o`.
@@ -837,7 +837,7 @@ pub(crate) unsafe fn llvm_optimize(
837837 } else if device_pathbuf
838838 . file_name ( )
839839 . and_then ( |n| n. to_str ( ) )
840- . is_some_and ( |n| n != "host.out " )
840+ . is_some_and ( |n| n != "device.bin " )
841841 {
842842 dcx. emit_err ( crate :: errors:: OffloadWrongFileName ) ;
843843 } else if !device_pathbuf. exists ( ) {
@@ -846,14 +846,14 @@ pub(crate) unsafe fn llvm_optimize(
846846 let host_path = cgcx. output_filenames . path ( OutputType :: Object ) ;
847847 let host_dir = host_path. parent ( ) . unwrap ( ) ;
848848 let out_obj = host_dir. join ( "host.o" ) ;
849- let host_out_c = path_to_c_string ( device_pathbuf. as_path ( ) ) ;
849+ let device_bin_c = path_to_c_string ( device_pathbuf. as_path ( ) ) ;
850850
851- // 2) Finalize host: lib.bc + host.out -> host.o (host TM)
851+ // 2) Finalize host: lib.bc + device.bin -> host.o (host TM)
852852 // We create a full clone of our LLVM host module, since we will embed the device IR
853853 // into it, and this might break caching or incremental compilation otherwise.
854854 let llmod2 = llvm:: LLVMCloneModule ( module. module_llvm . llmod ( ) ) ;
855855 let ok =
856- unsafe { llvm:: LLVMRustOffloadEmbedBufferInModule ( llmod2, host_out_c . as_ptr ( ) ) } ;
856+ unsafe { llvm:: LLVMRustOffloadEmbedBufferInModule ( llmod2, device_bin_c . as_ptr ( ) ) } ;
857857 if !ok {
858858 dcx. emit_err ( crate :: errors:: OffloadEmbedFailed ) ;
859859 }
@@ -868,7 +868,7 @@ pub(crate) unsafe fn llvm_optimize(
868868 prof,
869869 true ,
870870 ) ;
871- // We ignore cgcx.save_temps here and unconditionally always keep our `host.out ` artifact.
871+ // We ignore cgcx.save_temps here and unconditionally always keep our `device.bin ` artifact.
872872 // Otherwise, recompiling the host code would fail since we deleted that device artifact
873873 // in the previous host compilation, which would be confusing at best.
874874 }
0 commit comments