Skip to content

Commit e378563

Browse files
author
lingzhi98
authored
Enable xla cc test (#376)
1 parent 5815ecd commit e378563

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver.tpl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,18 @@ def call_compiler(argv, link = False, sycl_compile = True, xetla = False):
166166
ar_cmd = ('env ' + AR_PATH + ar_flags)
167167
return system(ar_cmd)
168168
elif link:
169-
flags = [shlex.quote(s) for s in flags]
169+
new_flags = []
170+
for s in flags:
171+
if s.endswith(".o"):
172+
new_flags.append("-Wl,--whole-archive")
173+
new_flags.append(shlex.quote(s))
174+
if s.endswith(".o"):
175+
new_flags.append("-Wl,--no-whole-archive")
170176
# sycl link
171177
out_files.append('-o')
172178
out_files.extend(args.o[0])
173-
flags += (common_flags + in_files + out_files + link_flags)
174-
cmd = ('env ' + CPU_COMPILER + ' ' + ' '.join(flags))
179+
new_flags += (common_flags + in_files + out_files + link_flags)
180+
cmd = ('env ' + CPU_COMPILER + ' ' + ' '.join(new_flags))
175181
return system(cmd)
176182
else:
177183
# host compilation

third_party/onednn/onednn_gpu.BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ cc_library(
148148
"-DNGEN_SAFE=1",
149149
"-DNGEN_NEO_INTERFACE=1",
150150
#TODO(itex): for symbol collision, may be removed in produce version
151-
"-fvisibility=hidden",
151+
#"-fvisibility=hidden",
152152
],
153153
includes = [
154154
"include",

xla/stream_executor/sycl/sycl_driver.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ limitations under the License.
5858
namespace stream_executor {
5959
namespace gpu {
6060

61+
ScopedActivateContext::ScopedActivateContext(GpuContext* context) {}
62+
ScopedActivateContext::~ScopedActivateContext() {}
63+
6164
#define MSEC_IN_SEC 1000
6265

6366
class GpuContext {

xla/stream_executor/sycl/sycl_executor.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ limitations under the License.
5656
namespace stream_executor {
5757
namespace gpu {
5858

59+
GpuContext* ExtractGpuContext(GpuExecutor* gpu_exec) {}
60+
5961
namespace sycl = ::sycl;
6062

6163
// Hook that can be used to CUBIN-ate PTX before it is loaded into the driver.

0 commit comments

Comments
 (0)