Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
q10 committed Mar 11, 2024
1 parent 50fc29c commit 7f1fc44
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/fbgemm_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ build_fbgemm_library () {
echo "[BUILD] Running the build ..."
# shellcheck disable=SC2086
print_exec conda run --no-capture-output ${env_prefix} \
make -j 1 VERBOSE=1
make -j VERBOSE=1

cd - || return 1
}
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,6 @@ endif()

if(FBGEMM_BUILD_BENCHMARKS)
add_subdirectory(bench)
append_cxx_flag_if_supported("-Wno-unused-variable" CMAKE_CXX_FLAGS)
append_cxx_flag_if_supported("-Wno-deprecated-volatile" CMAKE_CXX_FLAGS)
endif()

if(FBGEMM_BUILD_DOCS)
Expand Down
4 changes: 4 additions & 0 deletions bench/BenchUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ void randFill(aligned_vector<int64_t>& vec, int64_t low, int64_t high) {
std::generate(vec.begin(), vec.end(), [&] { return dis(eng); });
}

FBGEMM_PUSH_WARNING_AND_DISABLE("-Wdeprecated-volatile")

void llc_flush(std::vector<char>& llc) {
volatile char* data = llc.data();
for (size_t i = 0; i < llc.size(); i++) {
data[i]++;
}
}

FBGEMM_POP_WARNING

#ifdef __aarch64__
void aarch64_flush_cache_line(void* addr) {
asm volatile("dc civac, %0" ::"r"(addr) : "memory");
Expand Down
1 change: 1 addition & 0 deletions bench/BenchUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#endif

#include "./AlignedVec.h"
#include "fbgemm/Fbgemm.h"
#include "fbgemm/FbgemmBuild.h"
#include "fbgemm/FbgemmPackMatrixB.h"
#include "src/RefImplementations.h"
Expand Down
5 changes: 4 additions & 1 deletion bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ macro(add_benchmark BENCHNAME)
endmacro()

if(FBGEMM_BUILD_BENCHMARKS)

set(BENCHMARKS "")

file(GLOB BENCH_LIST "*Benchmark.cc")
Expand All @@ -97,4 +96,8 @@ if(FBGEMM_BUILD_BENCHMARKS)
add_dependencies(run_benchmarks
${BENCHMARKS})

set_source_files_properties(
bench/GEMMsBenchmark.cc
PROPERTIES COMPILE_FLAGS "-Wno-unused-variable")

endif()

0 comments on commit 7f1fc44

Please sign in to comment.