Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions test/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,8 @@ def run_test(

def try_set_cpp_stack_traces(env, command, set=True):
# Print full c++ stack traces during retries
# Don't do it for macos inductor tests as it makes them
# segfault for some reason
if not (
IS_MACOS and len(command) >= 2 and command[2].startswith(INDUCTOR_TEST_PREFIX)
):
env = env or {}
env["TORCH_SHOW_CPP_STACKTRACES"] = "1" if set else "0"
env = env or {}
env["TORCH_SHOW_CPP_STACKTRACES"] = "1" if set else "0"
return env


Expand Down
2 changes: 1 addition & 1 deletion torch/csrc/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static PyObject* THPModule_initExtension(
PyObject* _unused,
PyObject* shm_manager_path) {
HANDLE_TH_ERRORS
#if !defined(FBCODE_CAFFE2)
#if !defined(FBCODE_CAFFE2) && !defined(__aarch64__)
if (torch::get_cpp_stacktraces_enabled()) {
c10::SetStackTraceFetcher([]() -> std::string {
auto tb = torch::CapturedTraceback::gather(false, false, true);
Expand Down
16 changes: 8 additions & 8 deletions torch/csrc/profiler/unwind/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@
!__has_include("ext/stdio_filebuf.h")
namespace torch::unwind {
std::vector<void*> unwind() {
TORCH_CHECK(
false,
TORCH_WARN_ONCE(
"record_context_cpp is not support on non-linux non-x86_64 platforms");
return {};
}

std::optional<std::pair<std::string, uint64_t>> libraryFor(void* addr) {
TORCH_CHECK(
false,
TORCH_WARN_ONCE(
"record_context_cpp is not support on non-linux non-x86_64 platforms");
return {};
}

#ifndef FBCODE_CAFFE2
std::vector<Frame> symbolize(const std::vector<void*>& frames, Mode mode) {
TORCH_CHECK(
false,
TORCH_WARN_ONCE(
"record_context_cpp is not support on non-linux non-x86_64 platforms");
return {};
}
#endif

Stats stats() {
TORCH_CHECK(
false,
TORCH_WARN_ONCE(
"record_context_cpp is not support on non-linux non-x86_64 platforms");
return {};
}

} // namespace torch::unwind
Expand Down