Skip to content

Commit

Permalink
Fix experimental/web/ samples after recent changes. (iree-org#18567)
Browse files Browse the repository at this point in the history
Tested the WebAssembly static and dynamic samples locally. Both still
work today with these changes. The WebGPU sample has some build errors
(needs to be updated after HAL command buffer bindings refactoring).
  • Loading branch information
ScottTodd authored Sep 20, 2024
1 parent 914858f commit 546d862
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion experimental/web/sample_dynamic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ target_link_libraries(${_NAME}

target_link_options(${_NAME} PRIVATE
# https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#interacting-with-code-ccall-cwrap
"-sEXPORTED_FUNCTIONS=['_setup_sample', '_cleanup_sample', '_load_program', '_inspect_program', '_unload_program', '_call_function', '_malloc']"
"-sEXPORTED_FUNCTIONS=['_setup_sample', '_cleanup_sample', '_load_program', '_inspect_program', '_unload_program', '_call_function', '_malloc', '_free']"
"-sEXPORTED_RUNTIME_METHODS=['ccall','cwrap','UTF8ToString']"
#
"-sASSERTIONS=1"
Expand Down
2 changes: 1 addition & 1 deletion experimental/web/sample_dynamic/device_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ iree_status_t create_device_with_loaders(iree_allocator_t host_allocator,
&loaders[loader_count++]);
}

iree_string_view_t identifier = iree_make_cstring_view("sync");
iree_string_view_t identifier = iree_make_cstring_view("local-sync");
iree_hal_allocator_t* device_allocator = NULL;
if (iree_status_is_ok(status)) {
status = iree_hal_allocator_create_heap(identifier, host_allocator,
Expand Down
2 changes: 1 addition & 1 deletion experimental/web/sample_static/device_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ iree_status_t create_device_with_static_loader(iree_allocator_t host_allocator,
iree_hal_executable_import_provider_null(), host_allocator,
&library_loader);

iree_string_view_t identifier = iree_make_cstring_view("sync");
iree_string_view_t identifier = iree_make_cstring_view("local-sync");
iree_hal_allocator_t* device_allocator = NULL;
if (iree_status_is_ok(status)) {
status = iree_hal_allocator_create_heap(identifier, host_allocator,
Expand Down

0 comments on commit 546d862

Please sign in to comment.