Skip to content

Commit 1f5751b

Browse files
committed
Retry fixing
1 parent 1d71c38 commit 1f5751b

4 files changed

Lines changed: 19 additions & 16 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ announce_configured_options(CCACHE_PROGRAM)
9999

100100
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
101101

102-
103102
if(NOT EXECUTORCH_ENABLE_LOGGING)
104103
# Avoid pulling in the logging strings, which can be large. Note that this
105104
# will set the compiler flag for all targets in this directory, and for all
@@ -882,10 +881,14 @@ if(EXECUTORCH_BUILD_PYBIND)
882881
# This goes from executorch/extension/pybindings up to site-packages, then to
883882
# torch/lib
884883
if(APPLE)
885-
set_target_properties(
886-
portable_lib PROPERTIES BUILD_RPATH "@loader_path/../../../torch/lib"
887-
INSTALL_RPATH "@loader_path/../../../torch/lib"
888-
)
884+
get_target_property(existing_rpath portable_lib INSTALL_RPATH)
885+
string(FIND "${existing_rpath}" "@loader_path" pos)
886+
if(pos EQUAL -1)
887+
set_target_properties(
888+
portable_lib PROPERTIES BUILD_RPATH "@loader_path/../../../torch/lib"
889+
INSTALL_RPATH "@loader_path/../../../torch/lib"
890+
)
891+
endif()
889892
else()
890893
set_target_properties(
891894
portable_lib PROPERTIES BUILD_RPATH "$ORIGIN/../../../torch/lib"

‎backends/cuda/runtime/cuda_backend.cpp‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ class ET_EXPERIMENTAL CudaBackend final
109109
method_name.empty() ? "so_blob" : method_name + "_so_blob";
110110

111111
const NamedDataMap* named_data_map = context.get_named_data_map();
112-
auto aoti_cuda_buffer = named_data_map->get_data(so_blob_key.c_str());
112+
auto aoti_dso_buffer = named_data_map->get_data(so_blob_key.c_str());
113113
ET_CHECK_OR_RETURN_ERROR(
114-
aoti_cuda_buffer.ok(),
114+
aoti_dso_buffer.ok(),
115115
Internal,
116116
"Failed to get data for key %s: 0x%x",
117117
so_blob_key.c_str(),
118-
static_cast<uint32_t>(aoti_cuda_buffer.error()));
118+
static_cast<uint32_t>(aoti_dso_buffer.error()));
119119

120120
// Generate dynamic temporary file path
121121
filesystem::path temp_dir = filesystem::temp_directory_path();
@@ -129,12 +129,12 @@ class ET_EXPERIMENTAL CudaBackend final
129129
ET_LOG(
130130
Info,
131131
"Writing %zu bytes to %s",
132-
aoti_cuda_buffer->size(),
132+
aoti_dso_buffer->size(),
133133
so_path.c_str());
134134

135135
outfile.write(
136-
static_cast<const char*>(aoti_cuda_buffer->data()),
137-
aoti_cuda_buffer->size());
136+
static_cast<const char*>(aoti_dso_buffer->data()),
137+
aoti_dso_buffer->size());
138138

139139
ET_CHECK_OR_RETURN_ERROR(
140140
outfile, AccessFailed, "Failed to write to file %s", so_path.c_str());
@@ -143,13 +143,14 @@ class ET_EXPERIMENTAL CudaBackend final
143143
outfile.close();
144144

145145
// Free the buffer immediately after writing to disk
146-
aoti_cuda_buffer->Free();
146+
aoti_dso_buffer->Free();
147147
// Load the lib
148148
Result<void*> lib_handle_res = load_library(so_path);
149149
if (!lib_handle_res.ok()) {
150150
return lib_handle_res.error();
151151
}
152152
void* lib_handle = lib_handle_res.get();
153+
153154
processed->Free();
154155

155156
// Create handle and load function pointers into it

‎examples/models/moshi/mimi/install_requirements.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
set -x
99

1010
conda install -c conda-forge "ffmpeg<8" -y
11-
pip install torchcodec==0.7.0.dev20250929 --extra-index-url https://download.pytorch.org/whl/nightly/cpu
12-
pip install moshi==0.2.4
11+
pip install torchcodec==0.7.0.dev20251012 --extra-index-url https://download.pytorch.org/whl/nightly/cpu
12+
pip install moshi==0.2.4 --no-deps
1313
pip install bitsandbytes soundfile
1414
# Run llama2/install requirements for torchao deps
1515
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

‎examples/models/moshi/mimi/test_mimi.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ def forward(self, x):
189189
x = self.mimi_model.upsample(x)
190190
(emb,) = self.mimi_model.decoder_transformer(x)
191191
emb.transpose(1, 2)
192-
with self.mimi_model._context_for_encoder_decoder:
193-
out = self.mimi_model.decoder(emb)
192+
out = self.mimi_model.decoder(emb)
194193
return out
195194

196195
emb_input = torch.rand(1, 1, 512, device="cpu")

0 commit comments

Comments
 (0)