I am trying to use ti_weight_0 = ti.Matrix(hidden_size, hidden_size, dt=real, shape=(), needs_grad=True)
, and Taichi break down without any verbose.
But I can use ti_weight_0 = ti.Vector(hidden_size, hidden_size, dt=real, shape=(), needs_grad=True)
successfully.
Interesting… What’s your hidden size?
The hidden size = 64
It’s probably better to use a 64x64 scalar tensor: https://taichi.readthedocs.io/en/latest/tensor_matrix.html#matrix-size
I have changed the hidden_size = 2, but still get errors.
The code is
real = ti.f32
ti.set_default_fp(real)
ti.get_runtime().set_verbose(True)
hidden_size = 2
ti_weight_0 = ti.Vector(hidden_size, dt=real, shape=hidden_size, needs_grad=True)
print(ti_weight_0.to_numpy().shape)
This time I ran on Mac and got the error message:
[Release mode]
[T 12/19/19 00:05:00.198] [logging.cpp:Logger@68] Taichi core started. Thread ID = 5353
[E 12/19/19 00:05:00.198] Received signal 11 (Segmentation fault: 11)
* Taichi Core - Stack Traceback *
==========================================================================================
| Module | Offset | Function |
|----------------------------------------------------------------------------------------|
* taichi_core.so | 295 | taichi::signal_handler(int) |
* libsystem_platform.dylib | 29 | (null) |
* taichi_core.so | 16 | vtable for fmt::BasicMemoryWriter<char, std:: |
| __1::allocator<char> > |
* taichi_core.so | 94 | initView() |
* ??? | 305430717 | (null) |
* ??? | 305431778 | (null) |
* ??? | 305409895 | (null) |
* ??? | 305401848 | (null) |
* ??? | 305402008 | (null) |
* ??? | 305344391 | (null) |
* ??? | 305384559 | (null) |
* libdyld.dylib | 171 | (null) |
* python | 134 | (null) |
* python | 494 | (null) |
* python | 220 | (null) |
* python | 259 | (null) |
* python | 65 | (null) |
* python | 46071 | (null) |
* python | 418 | (null) |
* python | 195 | (null) |
* python | 174 | (null) |
* python | 45284 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45134 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 248 | (null) |
* python | 243 | (null) |
* python | 3593 | (null) |
* python | 36682 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 418 | (null) |
* python | 347 | (null) |
* python | 259 | (null) |
* python | 65 | (null) |
* python | 46071 | (null) |
* python | 418 | (null) |
* python | 195 | (null) |
* python | 174 | (null) |
* python | 45284 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45134 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 248 | (null) |
* python | 243 | (null) |
* python | 3593 | (null) |
* python | 36682 | (null) |
* python | 418 | (null) |
* python | 347 | (null) |
* python | 259 | (null) |
* python | 65 | (null) |
* python | 46071 | (null) |
* python | 418 | (null) |
* python | 195 | (null) |
* python | 174 | (null) |
* python | 45284 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45134 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 248 | (null) |
* python | 243 | (null) |
* python | 3593 | (null) |
* python | 36682 | (null) |
* python | 418 | (null) |
* python | 347 | (null) |
* python | 259 | (null) |
* python | 65 | (null) |
* python | 46071 | (null) |
* python | 418 | (null) |
* python | 195 | (null) |
* python | 174 | (null) |
* python | 45284 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45134 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
* python | 248 | (null) |
* python | 243 | (null) |
* python | 3593 | (null) |
* python | 36682 | (null) |
* python | 418 | (null) |
* python | 347 | (null) |
* python | 259 | (null) |
* python | 65 | (null) |
* python | 46071 | (null) |
* python | 418 | (null) |
* python | 195 | (null) |
* python | 174 | (null) |
* python | 45284 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45134 | (null) |
* python | 120 | (null) |
* python | 174 | (null) |
* python | 45343 | (null) |
* python | 120 | (null) |
==========================================================================================
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
Sorry about the delay. I tried this on Linux and Mac OS X, yet I couldn’t reproduce the crash. Are you on [Taichi version 0.3.2, commit 26635f82]
?
import taichi as ti
real = ti.f32
ti.set_default_fp(real)
ti.get_runtime().set_verbose(True)
hidden_size = 2
ti_weight_0 = ti.Vector(hidden_size, dt=real, shape=hidden_size, needs_grad=True)
print(ti_weight_0.to_numpy().shape)
Also what’s your OS X version?
Oh, I see. I first got errors on windows due to large hidden_size and then got errors on Mac due to Catalina. Sorry for the confusion.
I see. Sorry about the trouble. I don’t really have a Catalina machine to reproduce the issue, but it seems that Travis is releasing Catalina buildbots very soon: https://travis-ci.community/t/macos-catalina-build-environment/5608
I’ll try to add Catalina support after Travis releases that.
Thank you so much!~~