From b9bb72d0aa5fd1ff99aed8dec4c32e72bfe7fd05 Mon Sep 17 00:00:00 2001 From: Paul Keller Date: Thu, 12 Sep 2024 20:09:12 +0000 Subject: [PATCH] mm_sfence->tt_driver_atomics::sfence(); --- .../3_pcie_transfer/test_pull_from_pcie.cpp | 4 ++-- .../perf_microbenchmark/dispatch/test_bw_and_latency.cpp | 2 +- .../tt_metal/perf_microbenchmark/dispatch/test_prefetcher.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/tt_metal/tt_metal/perf_microbenchmark/3_pcie_transfer/test_pull_from_pcie.cpp b/tests/tt_metal/tt_metal/perf_microbenchmark/3_pcie_transfer/test_pull_from_pcie.cpp index 8e6161eb0f2..633837d305b 100644 --- a/tests/tt_metal/tt_metal/perf_microbenchmark/3_pcie_transfer/test_pull_from_pcie.cpp +++ b/tests/tt_metal/tt_metal/perf_microbenchmark/3_pcie_transfer/test_pull_from_pcie.cpp @@ -73,7 +73,7 @@ void nt_memcpy_128b(uint8_t *__restrict dst, const uint8_t *__restrict src, size } if (num_lines > 0) - _mm_sfence(); + tt_driver_atomics::sfence(); } template @@ -105,7 +105,7 @@ void nt_memcpy_256b(uint8_t *__restrict dst, const uint8_t *__restrict src, size } if (num_lines > 0) - _mm_sfence(); + tt_driver_atomics::sfence(); } int main(int argc, char **argv) { diff --git a/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_bw_and_latency.cpp b/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_bw_and_latency.cpp index 7e7ad2c224f..fe83238a742 100644 --- a/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_bw_and_latency.cpp +++ b/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_bw_and_latency.cpp @@ -117,7 +117,7 @@ void nt_memcpy(uint8_t *__restrict dst, const uint8_t * __restrict src, size_t n } if (num_lines > 0) - _mm_sfence(); + tt_driver_atomics::sfence(); } int main(int argc, char **argv) { diff --git a/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_prefetcher.cpp b/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_prefetcher.cpp index a575178e634..4f5b8019d7e 100644 --- a/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_prefetcher.cpp +++ b/tests/tt_metal/tt_metal/perf_microbenchmark/dispatch/test_prefetcher.cpp @@ -200,7 +200,7 @@ void dirty_host_completion_buffer(uint32_t *host_hugepage_completion_buffer) { for (int i = 0; i < DEFAULT_HUGEPAGE_COMPLETION_BUFFER_SIZE / sizeof(uint32_t); i++) { host_hugepage_completion_buffer[i] = host_data_dirty_pattern; } - _mm_sfence(); + tt_driver_atomics::sfence(); } uint32_t round_cmd_size_up(uint32_t size) { @@ -1344,7 +1344,7 @@ void nt_memcpy(uint8_t *__restrict dst, const uint8_t * __restrict src, size_t n } if (num_lines > 0) - _mm_sfence(); + tt_driver_atomics::sfence(); } void write_prefetcher_cmd(Device *device,