From d64ee86a3130f8eeb75d09193c38c621d7565eba Mon Sep 17 00:00:00 2001 From: Yong He Date: Sun, 26 Mar 2023 13:59:11 -0700 Subject: Add PyTorch C++ binding generation. (#2734) * Add PyTorch C++ binding generation. * fix --------- Co-authored-by: Yong He --- source/slangc/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slangc/main.cpp') diff --git a/source/slangc/main.cpp b/source/slangc/main.cpp index 2870a5a3c..2fe9d19a1 100644 --- a/source/slangc/main.cpp +++ b/source/slangc/main.cpp @@ -79,15 +79,15 @@ SLANG_TEST_TOOL_API SlangResult innerMain(StdWriters* stdWriters, slang::IGlobal if (TestToolUtil::hasDeferredStdLib(Index(argc - 1), argv + 1)) { SLANG_RETURN_ON_FAIL(slang_createGlobalSessionWithoutStdLib(SLANG_API_VERSION, session.writeRef())); - TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], session); } else if (!session) { // Just create the global session in the regular way if there isn't one set SLANG_RETURN_ON_FAIL(slang_createGlobalSession(SLANG_API_VERSION, session.writeRef())); - TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], session); } + TestToolUtil::setSessionDefaultPreludeFromExePath(argv[0], session); + SlangCompileRequest* compileRequest = spCreateCompileRequest(session); compileRequest->addSearchPath(Path::getParentDirectory(Path::getExecutablePath()).getBuffer()); SlangResult res = _compile(compileRequest, argc, argv); -- cgit v1.2.3