This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/torch/csrc/lazy/core/shape.cpp b/torch/csrc/lazy/core/shape.cpp | |
index 1ac306f0af..e2aa974646 100644 | |
--- a/torch/csrc/lazy/core/shape.cpp | |
+++ b/torch/csrc/lazy/core/shape.cpp | |
@@ -1,5 +1,6 @@ | |
#include <c10/util/irange.h> | |
#include <torch/csrc/lazy/core/shape.h> | |
+#include <iostream> | |
namespace torch { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/components/dummy_optimizer.py b/components/dummy_optimizer.py | |
index b462bb5..f0d63d7 100644 | |
--- a/components/dummy_optimizer.py | |
+++ b/components/dummy_optimizer.py | |
@@ -5,7 +5,7 @@ import torch | |
def optim_func(params) : | |
class DummyOptimizer : | |
def __init__(self, params) : | |
- self.params = params | |
+ self.params = list(params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def forward(self, maskT : torch.Tensor, maskU : torch.Tensor, maskV : torch.Tensor, maskW : torch.Tensor, dxt : torch.Tensor, dxu : torch.Tensor, dyt : torch.Tensor, dyu : torch.Tensor, dzt : torch.Tensor, dzw : torch.Tensor, cost : torch.Tensor, cosu : torch.Tensor, salt : torch.Tensor, temp : torch.Tensor, zt : torch.Tensor, K_iso : torch.Tensor, K_11 : torch.Tensor, K_22 : torch.Tensor, K_33 : torch.Tensor, Ai_ez : torch.Tensor, Ai_nz : torch.Tensor, Ai_bx : torch.Tensor, Ai_by : torch.Tensor): | |
mask_t = maskT | |
mask_u = maskU | |
mask_v = maskV | |
mask_w = maskW | |
k_iso = K_iso | |
k_11 = K_11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph(): | |
%tensor : [#users=1] = call_function[target=torch.tensor](args = ((16, 12),), kwargs = {dtype: torch.float32}) | |
return (tensor,) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph(): | |
%full : [#users=2] = call_function[target=torch.full](args = ((512, 512), -inf), kwargs = {}) | |
%arange : [#users=2] = call_function[target=torch.arange](args = (512,), kwargs = {}) | |
%add : [#users=1] = call_function[target=operator.add](args = (%arange, 1), kwargs = {}) | |
%view : [#users=1] = call_method[target=view](args = (%add, 512, 1), kwargs = {}) | |
%lt : [#users=1] = call_function[target=operator.lt](args = (%arange, %view), kwargs = {}) | |
%masked_fill_ : [#users=0] = call_method[target=masked_fill_](args = (%full, %lt, 0), kwargs = {}) | |
%to : [#users=1] = call_method[target=to](args = (%full, torch.float32), kwargs = {}) | |
%getitem : [#users=1] = call_function[target=operator.getitem](args = (%to, (None, None, slice(None, None, None), slice(None, None, None))), kwargs = {}) | |
%expand : [#users=1] = call_method[target=expand](args = (%getitem, 1, 1, 512, 512), kwargs = {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build pytorch. Note the instaleld python already have pytorch installed but that misses modules | |
# like tools.codegen.gen_backend_stubs which is needed by xla build scripts | |
cd /pytorch # the container already have a pytorch clone | |
python setup.py develop | |
cd / | |
# NOTE: xla is already clondes in /pytorch/xla . xla/scripts/apply_patches.sh requires xla to be under pytorch/ | |
git clone --recursive https://github.com/pytorch/xla | |
cd /xla/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IR { | |
%0 = s64[] xla::device_data(), device=GPU:0 | |
%1 = s64[] prim::Constant(), value=214013 | |
%2 = s64[] aten::mul(%1, %0) | |
%3 = s64[] prim::Constant(), value=2531011 | |
%4 = s64[] aten::add(%3, %2) | |
%5 = s64[] prim::Constant(), value=214013 | |
%6 = s64[] aten::mul(%5, %4) | |
%7 = s64[] prim::Constant(), value=2531011 | |
%8 = s64[] aten::add(%7, %6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make[1]: *** [test_api/CMakeFiles/test_api.dir/all] Error 2 | |
[ 96%] Linking CXX executable ../bin/test_tensorexpr | |
../lib/libtorch_cuda.so: undefined reference to `at::cuda::jit::jit_pwise_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' | |
../lib/libtorch_cuda.so: undefined reference to `torch::Library::Library(torch::Library::Kind, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, c10::optional<c10::DispatchKey>, char const*, unsigned int)' | |
../lib/libtorch_cuda.so: undefined reference to `at::cuda::jit::generate_reduction_code(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<ch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 86%] Linking CXX shared library ../lib/libtorch_cuda.so | |
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../x86_64-linux-gnu/crti.o: In function `_init': | |
(.init+0x7): relocation truncated to fit: R_X86_64_REX_GOTPCRELX against undefined symbol `__gmon_start__' | |
CMakeFiles/torch_cuda.dir/__/aten/src/ATen/cuda/CUDAContext.cpp.o: In function `void std::call_once<void (&)()>(std::once_flag&, void (&)())': | |
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/mutex:676:(.text+0x51): relocation truncated to fit: R_X86_64_TLSGD against symbol `std::__once_callable@@GLIBCXX_3.4.11' defined in .tbss section in /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/libstdc++.so | |
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/mutex:677:(.text+0x70): relocation truncated to fit: R_X86_64_TLSGD against symbol `std::__once_call@@GLIBCXX_3.4.11' defined in .tbss section in /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/libstdc++.so | |
CMakeFiles/torch_cuda.dir/__/aten/src/ATen/cuda/CUDAContext.cpp. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../lib/libtorch_cuda.so: undefined reference to `at::cuda::jit::jit_pwise_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' | |
../lib/libtorch_cuda.so: undefined reference to `at::TensorBase::toString[abi:cxx11]() const' | |
../lib/libtorch_cuda.so: undefined reference to `c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' | |
../lib/libtorch_cuda.so: undefined reference to `c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' | |
../lib/libtorch_cuda.so: undefined reference to `at::cuda::jit::generate_code(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::all |
OlderNewer