Comments (9)
PIL has some C bits that need compiling, which is why it's just not a plain Python package that you can clone and import.
Maybe the best option is to just apt install python3-pil
?
from cfu-playground.
Thanks @danc86 , I thought that would be the answer! But it didn't work as expected on my Ubuntu 20.04LTS laptop nor on my work laptop. I tried pip3 install Pillow==7.1.2
on my personal laptop, and it got me past this issue to the next issue (a complaint about not including the correct header for printf
).
Edit: the printf issue is easily remedied by adding #include <cstdio>
to print_params.cc.
from cfu-playground.
After working around the above two issues, I encounter this issue:
make[1]: Entering directory '/home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build'
CXX reduce.cc reduce.o
In file included from /home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/kernels/internal/common.h:29,
from /home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/kernels/internal/reference/reduce.h:19,
from /home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/micro/kernels/reduce.cc:16:
/home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/kernels/internal/types.h: In function 'TfLiteStatus tflite::ops::micro::reduce::EvalMean(TfLiteContext*, TfLiteNode*)':
/home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/kernels/internal/types.h:185:33: error: 'resolved_axis' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (idx == axis[axis_idx]) {
~~~~~~~~~~~~~^
/home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/kernels/internal/types.h:185:33: error: 'resolved_axis' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (idx == axis[axis_idx]) {
~~~~~~~~~~~~~^
/home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/kernels/internal/types.h:185:33: error: 'resolved_axis' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (idx == axis[axis_idx]) {
~~~~~~~~~~~~~^
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:188: /home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/micro/kernels/reduce.o] Error 1
make[1]: Leaving directory '/home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build'
make: *** [../proj.mk:190: /home/tim/tcal-x/CFU-Playground/proj/proj_template_v/build/software.bin] Error 2
from cfu-playground.
How are you installing the Python dependencies? You should just need to add it to your requirements.txt
or environment.yml
file?
from cfu-playground.
How are you installing the Python dependencies? You should just need to add it to your
requirements.txt
orenvironment.yml
file?
Yes, when we switch to Conda* installation, that is what we will do. Currently, we explicitly set PYTHONPATH to include everything under third_party/python/
. For example, to handle the new meson
dependency from picolibc, we added meson
as a submodule (ad5cbfc) instead of adding it to a requirements.txt
file.
* Two of the barriers have been addressed (differences in performance Conda vs fresh-built, and lack of a RISCV toolchain package with g++), so we should be able to move forward with using Conda / make-env
now.
from cfu-playground.
As you have just discovered, manipulating the PYTHONPATH
is not a support way for adding modules into your Python environment. It breaks in a huge number of ways that I'm surprised you are only seeing this issue now.
from cfu-playground.
@mithro All the mechanisms for setting up environments have interesting shortcomings. The /environment
script we have is not how I would have chosen to do it, but it's been working well. Perhaps we could discuss replacing it in person or on a different issue?
from cfu-playground.
@tcal-x In terms of timing I think we'll be happy with the current TfLM version for the next six months or so, so happy to wait while the environment issues are sorted out.
from cfu-playground.
The three primary options for Python environments are;
- (a) System install (IE using packages / pip and/or
pip --user
). No isolation from what the user has previously installed. - (b) "Python-only"
virtualenv
system (couple of choices beingvirtualenv
,venv
andpipenv
). Creates a "self contained" environment containing Python. Anything not in directly in Python is provided by the system. Good for pure Python systems. - (c) Conda. A self contained environment containing Python and other packages which would be provided by the system otherwise. Good for systems which want to support multiple platforms (Linux, Windows, Mac).
In both (b) and (c) any locally provided dependencies (like through submodules) need to get "installed" into the environment.
In (a) any locally provided dependencies (like through submodules) need to get installed onto the users system. However, people hate doing this so they slowly end up re-creating either (b) or (c) poorly (I know because I've fallen into this trap myself).
It is actually pretty easy to start with (b) and then add / extend to (c). I have some notes around this topic here.
from cfu-playground.
Related Issues (20)
- `make renode` and `make renode-headless` errors in the The Step-by-Step Guide to Building an ML Accelerator HOT 5
- Is there any way to use CFU Playground with Altera/Intel boards? HOT 31
- "make load" step got stuck HOT 5
- OSError: Failed to find config file
- How to use renode for other LiteX boards? HOT 1
- "make renode" is broken -- due to Verilator 5.006? HOT 3
- get stuck when load software.bin through /dev/ttyUSB1 HOT 8
- Need help with understanding software part of mnv2 example HOT 1
- How to accelerate `make prog` run time HOT 1
- Use of L2 in FPGA setups HOT 1
- Using BRAMs instead of LUTRAMs for big cfu storage HOT 1
- error:Could not locate Gemfile HOT 2
- Issue in synthesis for large design HOT 2
- Synthesizing the model
- `make load` on a Kosagi FOMU board HOT 4
- How to print the "perf counters" when I use the FPU variant? HOT 1
- Failing CI for Lattice Nexus / prjoxide tests
- Failing CI for Symbiflow installation -- out of disk space
- Renode Error HOT 4
- Symbiflow not working for Xilinx HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfu-playground.