Giter VIP home page Giter VIP logo

Comments (11)

sushreebarsa avatar sushreebarsa commented on July 19, 2024

@abeyene Could you please verify that all source files related to cpuinfo are being compiled and included in the build. The missing cpuinfo_riscv_linux_init function should be implemented in one of the source files. Kindly upgrade to the latest TF version and let us know? Thank you!

from tensorflow.

abeyene avatar abeyene commented on July 19, 2024

@sushreebarsa I am cloning the tensorflow repository and using the master branch. Is that not the latest TF version by default?

from tensorflow.

sushreebarsa avatar sushreebarsa commented on July 19, 2024

@abeyene If you are using the master branch then it would be latest as you mentioned of using TF 2.14 I asked for an upgrade. Thank you for the update!

from tensorflow.

sawantkumar avatar sawantkumar commented on July 19, 2024

Hi @pkgoogle ,

I tried to replicate this issue on ubuntu 20 and tensorflow 2.16 but i keep running into the below error , can you please take a look

/mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:62:26: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'? /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:62:31: error: template argument 1 is invalid 62 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:62:38: error: 'TimeZoneMutex' was not declared in this scope 62 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~~~~~~~~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:62:33: warning: unused variable 'lock' [-Wunused-variable] 62 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:76:24: error: 'mutex' is not a member of 'std' 76 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:76:24: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'? /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:76:29: error: template argument 1 is invalid 76 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:76:36: error: 'TimeZoneMutex' was not declared in this scope 76 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~~~~~~~~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:76:31: warning: unused variable 'lock' [-Wunused-variable] 76 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc: In static member function 'static void absl::lts_20230802::time_internal::cctz::time_zone::Impl::ClearTimeZoneMapTestOnly()': /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:87:24: error: 'mutex' is not a member of 'std' 87 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:87:24: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'? /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:87:29: error: template argument 1 is invalid 87 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:87:36: error: 'TimeZoneMutex' was not declared in this scope 87 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~~~~~~~~~~ /mnt/disks/my-disk/minimal_build/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc:87:31: warning: unused variable 'lock' [-Wunused-variable] 87 | std::lock_guard<std::mutex> lock(TimeZoneMutex()); | ^~~~ make[2]: *** [_deps/abseil-cpp-build/absl/time/CMakeFiles/time_zone.dir/build.make:102: _deps/abseil-cpp-build/absl/time/CMakeFiles/time_zone.dir/internal/cctz/src/time_zone_impl.cc.obj] Error 1 make[1]: *** [CMakeFiles/Makefile2:5567: _deps/abseil-cpp-build/absl/time/CMakeFiles/time_zone.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

from tensorflow.

pkgoogle avatar pkgoogle commented on July 19, 2024

Hi @abeyene, can you please provide instructions on how to replicate your conda environment? Also for clarification... is riscv.cmake exactly this?:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR rv64g)

set(CMAKE_C_COMPILER /local/data0/chipyard/.conda-env/riscv-tools/bin/riscv64-unknown-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER /local/data0/chipyard/.conda-env/riscv-tools/bin/riscv64-unknown-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH /local/data0/chipyard/.conda-env/riscv-tools/sysroot)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
include_directories(BEFORE /local/data0/chipyard/.conda-env/riscv-tools/riscv64-unknown-linux-gnu/include)

One thing you can try is using a previous release branch or nightly. Generally speaking master is very dynamic and depending on the exact commit you hit, it may be unstable.

Also I see a discrepancy between your original instructions and the folder tree structure. For clarification, did you make the minimal build folder as a sibling to tensorflow_src? or Within it? Any clarification would be great.

from tensorflow.

abeyene avatar abeyene commented on July 19, 2024

Hi @pkgoogle,

Yes, it seems like moving to a different release branch solved the problem. I'm able to build the minimal tflite example using release branch v2.15.0. Note that release branch v.2.17.0-rc1 DID NOT work however.

Also, I've switched to a new RISC-V compiler. While the above riscv.cmake file you posted was my indeed my old one, the new configuration looks like this:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR rv64g)

# which compilers to use for C and C++

set(CMAKE_C_COMPILER /local/data0/AB/riscv-linux/buildroot-2023.02.3/output/host/bin/riscv64-buildroot-linux-musl-gcc)
set(CMAKE_CXX_COMPILER /local/data0/AB/riscv-linux/buildroot-2023.02.3/output/host/bin/riscv64-buildroot-linux-musl-g++)

# where is the target environment located
set(CMAKE_FIND_ROOT_PATH /local/data0/AB/riscv-linux/buildroot-2023.02.3/output/host/riscv64-buildroot-linux-musl)

# adjust the default behavior of the FIND_XXX() commands:

# search programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

# search headers and libraries in the target environment
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
include_directories(BEFORE /local/data0/AB/riscv-linux/buildroot-2023.02.3/output/host/include)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFLATBUFFERS_LOCALE_INDEPENDENT=0 -DCPUINFO_SUPPORTED_PLATFORM=0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFLATBUFFERS_LOCALE_INDEPENDENT=0 -DCPUINFO_SUPPORTED_PLATFORM=0")

set(CMAKE_VERBOSE_MAKEFILE ON)

So there is no longer any conda environment. Simply an existing RISC-V toolchain installation.

And yes, I created the minimal_build directory within the tensorflow repository:

git clone https://github.com/tensorflow/tensorflow.git tensorflow_src
cd tensorflow_src
mkdir minimal_build

from tensorflow.

pkgoogle avatar pkgoogle commented on July 19, 2024

Hello @abeyene would you say your issue is resolved then? Thanks.

from tensorflow.

github-actions avatar github-actions commented on July 19, 2024

This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.

from tensorflow.

abeyene avatar abeyene commented on July 19, 2024

Yes I would say the issue is resolved.

Thank you.

from tensorflow.

pkgoogle avatar pkgoogle commented on July 19, 2024

Sure thing, if you have no more open items please feel free to close.

from tensorflow.

google-ml-butler avatar google-ml-butler commented on July 19, 2024

Are you satisfied with the resolution of your issue?
Yes
No

from tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.