Skip to content

Commit c2c0b23

Browse files
authored
Minor comments on ABI stability (#4148)
1 parent 5548eb2 commit c2c0b23

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ else()
152152
endif()
153153
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warning_flags} ${TORCH_CXX_FLAGS}")
154154

155-
# Ensure that torchaudio is torch ABI stable.
155+
# Ensure that torchaudio is torch ABI stable with torch 2.10 onwards
156156
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTORCH_TARGET_VERSION=0x020a000000000000")
157157

158158
find_program(CCACHE_PROGRAM ccache)

src/libtorchaudio/cuctc/src/python_binding.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2525
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

27-
// It is safe to temporarily disable TORCH_TARGET_VERSION for pybind11
27+
// Stuff in third_party/ is considered non-ABI-stable
28+
// (https://github.com/pytorch/pytorch/issues/169893), but
29+
// it is safe to temporarily disable TORCH_TARGET_VERSION for pybind11
2830
// as it is a header-only library.
2931
#ifdef TORCH_TARGET_VERSION
3032
#define SAVE_TORCH_TARGET_VERSION TORCH_TARGET_VERSION

src/libtorchaudio/pybind/pybind.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <libtorchaudio/utils.h>
22

3-
// It is safe to temporarily disable TORCH_TARGET_VERSION for pybind11
3+
// Stuff in third_party/ is considered non-ABI-stable
4+
// (https://github.com/pytorch/pytorch/issues/169893), but
5+
// it is safe to temporarily disable TORCH_TARGET_VERSION for pybind11
46
// as it is a header-only library.
57
#ifdef TORCH_TARGET_VERSION
68
#define SAVE_TORCH_TARGET_VERSION TORCH_TARGET_VERSION

0 commit comments

Comments
 (0)