Skip to content

Commit

Permalink
#8453: Update UMD version and t3k device indices
Browse files Browse the repository at this point in the history
#0: add submodule update to build artifact

#0: Update umd device cmake to include newly added files
  • Loading branch information
abhullar-tt committed May 15, 2024
1 parent 3d28ff1 commit 1685dc8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: Set up dynamic env vars for build
run: |
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV
- name: Update submodules
run: |
git submodule update --init --recursive
- uses: ./.github/actions/install-python-deps
- name: Build tt-metal and libs
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
url = https://github.com/tenstorrent-metal/tracy.git
[submodule "tt_metal/third_party/umd"]
path = tt_metal/third_party/umd
url = https://github.com/tenstorrent-metal/umd.git
url = https://github.com/tenstorrent/tt-umd.git
[submodule "tt_metal/third_party/tt_llk_grayskull"]
path = tt_metal/third_party/tt_llk_grayskull
url = https://github.com/tenstorrent/tt-llk-gs.git
Expand Down
11 changes: 5 additions & 6 deletions cmake/umd_device.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,21 @@ endif()

# If in production build for python packaging, need to use objs built by umd_device
if(NOT BUILD_SHARED_LIBS)
if($ENV{ARCH_NAME} STREQUAL "wormhole_b0")
set(UMD_OBJS ${CMAKE_BINARY_DIR}/obj/umd/device/wormhole/impl_device.o)
else()
set(UMD_OBJS ${CMAKE_BINARY_DIR}/obj/umd/device/$ENV{ARCH_NAME}/impl_device.o)
endif()
set(UMD_OBJS
${UMD_OBJS}
${CMAKE_BINARY_DIR}/obj/umd/device/architecture_implementation.o
${CMAKE_BINARY_DIR}/obj/umd/device/blackhole_implementation.o
${CMAKE_BINARY_DIR}/obj/umd/device/cpuset_lib.o
${CMAKE_BINARY_DIR}/obj/umd/device/grayskull_implementation.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_cluster_descriptor.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_device.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_emulation_stub.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_silicon_driver_common.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_silicon_driver.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_soc_descriptor.o
${CMAKE_BINARY_DIR}/obj/umd/device/tt_versim_stub.o
${CMAKE_BINARY_DIR}/obj/umd/device/util.o
${CMAKE_BINARY_DIR}/obj/umd/device/tlb.o
${CMAKE_BINARY_DIR}/obj/umd/device/wormhole_implementation.o
)
set(UMD_STATIC_LIB ${CMAKE_BINARY_DIR}/lib/libdevice.a)

Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def t3k_device_mesh(request, silicon_arch_name, silicon_arch_wormhole_b0):

if ttnn.get_num_devices() < 8:
pytest.skip()
device_ids = [0, 7, 6, 1, 2, 5, 4, 3]
device_ids = [0, 4, 5, 1, 2, 6, 7, 3]
try:
num_devices_requested = min(request.param, len(device_ids))
except (ValueError, AttributeError):
Expand Down
2 changes: 1 addition & 1 deletion models/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ def get_devices_for_t3000(all_devices, num_devices):
return all_devices[:num_devices]
elif num_devices == 8:
# TODO: Generalize this for different arch
hamiltonian_ring_indices = [0, 7, 6, 1, 2, 5, 4, 3]
hamiltonian_ring_indices = [0, 4, 5, 1, 2, 6, 7, 3]
return [all_devices[i] for i in hamiltonian_ring_indices]
else:
raise NotImplementedError("Only supports 1, 2, 3, 4, and 8 chip configurations!")
Expand Down
1 change: 0 additions & 1 deletion tt_metal/impl/device/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "tt_metal/detail/tt_metal.hpp"
#include "impl/debug/dprint_server.hpp"
#include "impl/debug/watcher_server.hpp"
#include "tt_metal/third_party/umd/device/util.hpp"
#include "common/env_lib.hpp"
#include "tt_metal/impl/dispatch/kernels/packet_queue_ctrl.hpp"
#include "common/utils.hpp"
Expand Down
8 changes: 7 additions & 1 deletion tt_metal/llrt/tt_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ std::filesystem::path get_cluster_desc_yaml() {

// Generates the cluster descriptor in the CWD

const fs::path eth_fpath = tt_metal_dir / "third_party/umd/device/bin/silicon/wormhole/create-ethernet-map";
#if defined(__x86_64__) || defined(__i386__)
const fs::path eth_fpath = tt_metal_dir / "third_party/umd/device/bin/silicon/x86/create-ethernet-map";
#elif defined(__aarch64__) || defined(_M_ARM64)
const fs::path eth_fpath = tt_metal_dir / "third_party/umd/device/bin/silicon/aarch64/create-ethernet-map";
#else
#error "Unsupported host architecture"
#endif
std::string cmd = eth_fpath.string() + " " + cluster_desc_path.string();
int val = system(cmd.c_str());
if(val != 0) throw std::runtime_error("Cluster Generation with create-ethernet-map Failed!");
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/third_party/umd
Submodule umd updated 59 files
+0 −4 .gitattributes
+3 −1 .gitignore
+16 −0 CHANGELOG
+23 −0 device/architecture.h
+23 −0 device/architecture_implementation.cpp
+65 −0 device/architecture_implementation.h
+0 −15 device/bin/silicon/README.md
+ device/bin/silicon/aarch64/create-ethernet-map
+0 −39 device/bin/silicon/boot-mobo.sh
+0 −90 device/bin/silicon/grayskull/debug_mailbox.py
+0 −18 device/bin/silicon/grayskull/pci-tlb-status.py
+0 −1 device/bin/silicon/grayskull/python-libs
+0 −26 device/bin/silicon/grayskull/status.py
+0 −3 device/bin/silicon/grayskull/tt-script
+0 −446 device/bin/silicon/grayskull/ttx_status.py
+0 −3 device/bin/silicon/reset-chip
+0 −62 device/bin/silicon/reset.sh
+0 −3 device/bin/silicon/wormhole/create-ethernet-map
+0 −92 device/bin/silicon/wormhole/debug_mailbox.py
+0 −30 device/bin/silicon/wormhole/issue-diagnose.py
+0 −28 device/bin/silicon/wormhole/status.py
+0 −3 device/bin/silicon/wormhole/tt-script
+0 −487 device/bin/silicon/wormhole/ttx_status.py
+ device/bin/silicon/x86/create-ethernet-map
+0 −49 device/blackhole/impl_device.cpp
+94 −0 device/blackhole_implementation.cpp
+269 −0 device/blackhole_implementation.h
+0 −4 device/cpuset_lib.cpp
+0 −47 device/grayskull/impl_device.cpp
+84 −0 device/grayskull_implementation.cpp
+231 −0 device/grayskull_implementation.h
+5 −10 device/module.mk
+31 −0 device/tlb.cpp
+57 −0 device/tlb.h
+9 −8 device/tt_arch_types.h
+153 −19 device/tt_cluster_descriptor.cpp
+14 −1 device/tt_cluster_descriptor.h
+22 −4 device/tt_device.h
+32 −2 device/tt_emulation_device.cpp
+4 −0 device/tt_emulation_device.h
+3 −0 device/tt_emulation_stub.cpp
+214 −185 device/tt_silicon_driver.cpp
+0 −37 device/tt_silicon_driver_common.cpp
+0 −35 device/tt_silicon_driver_common.hpp
+1 −0 device/tt_soc_descriptor.h
+3 −70 device/tt_xy_pair.h
+0 −53 device/wormhole/impl_device.cpp
+92 −0 device/wormhole_implementation.cpp
+264 −0 device/wormhole_implementation.h
+78 −0 device/xy_pair.h
+19 −8 emulation_rocky8.def
+1 −1 tests/galaxy/test_umd_concurrent_threads.cpp
+2 −1 tests/galaxy/test_umd_remote_api.cpp
+2 −2 tests/galaxy/test_umd_remote_api_stability.cpp
+5 −0 tests/module.mk
+14 −12 tests/test_utils/generate_cluster_desc.cpp
+0 −0 tests/test_utils/generate_cluster_desc.hpp
+1 −2 tests/wormhole/test_silicon_driver_wh.cpp
+2 −2 tests/wormhole/test_umd_remote_api_stability.cpp

0 comments on commit 1685dc8

Please sign in to comment.