Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Fairseq
Commits
30953d8b
Commit
30953d8b
authored
Oct 24, 2017
by
James Reed
Committed by
Myle Ott
Oct 24, 2017
Browse files
Fix for building under clang: specify C++ build and use C++ linkage (#42)
parent
c83efd21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
fairseq/clib/temporal_convolution_tbc/temporal_convolution_tbc.cpp
...lib/temporal_convolution_tbc/temporal_convolution_tbc.cpp
+2
-2
setup.py
setup.py
+1
-0
No files found.
fairseq/clib/temporal_convolution_tbc/temporal_convolution_tbc.cpp
View file @
30953d8b
...
@@ -29,7 +29,7 @@ inline at::Tensor t(at::Type& type, void* i) {
...
@@ -29,7 +29,7 @@ inline at::Tensor t(at::Type& type, void* i) {
return
type
.
unsafeTensorFromTH
(
i
,
true
);
return
type
.
unsafeTensorFromTH
(
i
,
true
);
}
}
extern
"C"
void
TemporalConvolutionTBC_forward
(
void
TemporalConvolutionTBC_forward
(
const
char
*
dtype
,
const
char
*
dtype
,
void
*
_input
,
void
*
_input
,
void
*
_output
,
void
*
_output
,
...
@@ -72,7 +72,7 @@ extern "C" void TemporalConvolutionTBC_forward(
...
@@ -72,7 +72,7 @@ extern "C" void TemporalConvolutionTBC_forward(
}
}
}
}
extern
"C"
void
TemporalConvolutionTBC_backward
(
void
TemporalConvolutionTBC_backward
(
const
char
*
dtype
,
const
char
*
dtype
,
void
*
_dOutput
,
void
*
_dOutput
,
void
*
_dInput
,
void
*
_dInput
,
...
...
setup.py
View file @
30953d8b
...
@@ -42,6 +42,7 @@ conv_tbc = create_extension(
...
@@ -42,6 +42,7 @@ conv_tbc = create_extension(
define_macros
=
[(
'WITH_CUDA'
,
None
)],
define_macros
=
[(
'WITH_CUDA'
,
None
)],
with_cuda
=
True
,
with_cuda
=
True
,
extra_compile_args
=
[
'-std=c++11'
],
extra_compile_args
=
[
'-std=c++11'
],
source_extension
=
'.cpp'
,
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment