ROCm / Tensile

Stretching GPU performance for GEMMs and tensor contractions.
MIT License
215 stars 147 forks source link

Fail to build target with develop branch #1198

Open ce1adon opened 3 years ago

ce1adon commented 3 years ago

I got the following issue when building with tip of the tensile branch develop@7e0f2dc5e5219d3af32a76857d4e8272e28068bf: “ CMakeFiles/copy_kernels_miopentensile.dir/build.make:59: *** target pattern contains no '%'. Stop.

CMakeFiles/Makefile2:105: recipe for target 'CMakeFiles/copy_kernels_miopentensile.dir/all' failed

make[2]: *** [CMakeFiles/copy_kernels_miopentensile.dir/all] Error 2

make[2]: *** Waiting for unfinished jobs... “

cgmillette commented 3 years ago

@ce1adon can we get a little more context please?

Is this coming from a clean build?

If so, can you please provide the full log?

Also, which docker image are you working with? Recent changes to targetid might have upset a few things.

ce1adon commented 3 years ago

@cgmillette Sure, I was building in MIOpenTensile with the tip of develop@7e0f2dc5e5219d3af32a76857d4e8272e28068bf.

To replay this issue, git clone https://github.com/ROCmSoftwarePlatform/MIOpenTensile -b develop cd MIOpenTensile vi CMakelists.txt

find line 74 and change the tensile tag to 7e0f2dc5e5219d3af32a76857d4e8272e28068bf. Save and quit.

mkdir build cd build export HIPCC_LINK_FLAGS_APPEND='-O3 -parallel-jobs=4' export HIPCC_COMPILE_FLAGS_APPEND='-O3 -Wno-format-nonliteral -parallel-jobs=4' CXX=/opt/rocm/hip/bin/hipcc cmake .. make -j check

Then you will observe this error.

cgmillette commented 3 years ago

This might have something to do with the targetid stuff that was checked in not too long ago. I will forward you an email about it.

cgmillette commented 3 years ago

@ce1adon does the new targetid docker base image fix the issue?

ce1adon commented 3 years ago

@cgmillette No, issue still there with the new docker image.

ppanchad-amd commented 3 months ago

@ce1adon Apologies for the lack of response. Can you please test with the latest ROCm 6.1.2? If issue is resolved, please close the ticket. Thanks!

darren-amd commented 4 weeks ago

Hi @ce1adon,

I was able to build Tensile successfully on the latest ROCm version (6.2) using the below steps: 1) Install the dependencies available here: https://github.com/ROCm/Tensile/wiki/Dependencies 2) Clone the Tensile repository:

mkdir Tensile
cd Tensile
git clone https://github.com/ROCmSoftwarePlatform/Tensile repo
cd repo
git checkout master

3) I had to make a few edits to the ./Tensile/Configs/rocblas_sgemm_example.yaml file for it to be compatible with the latest version of Tensile, which you can find here:

GlobalParameters:
  MinimumRequiredVersion: 4.4.0
  PrintLevel: 1
  ForceRedoBenchmarkProblems: True
  ForceRedoLibraryLogic: True
  ForceRedoLibraryClient: True
  CMakeBuildType: Release
  EnqueuesPerSync: 5
  SyncsPerBenchmark: 3
  LibraryPrintDebug: False
  NumElementsToValidate: 128
  ValidationMaxToPrint: 4
  ValidationPrintValids: False
  ShortNames: False
  MergeFiles: False
  Platform: 0
  Device: 0
  KernelTime: True
  SleepPercent: 0
  DataInitTypeBeta : 0
  PrintSolutionRejectionReason: True # Route rejected configs to std out.
  PrintWinnersOnly: 0

BenchmarkProblems:
  ########################################
  # NN - standard
  ########################################
  -
    - # ProblemType
      OperationType: GEMM
      DataType: s
      TransposeA: False
      TransposeB: False
      UseBeta: True
      Batched: True

    - # BenchmarkProblemSizeGroup - standard
      BenchmarkCommonParameters:
        # Specify parameters that are to take a single value that is
        # the same for every solution.
        - KernelLanguage: ["Assembly"]
        - EdgeType: ["ShiftPtr"]
        - LoopTail: [True]
      ForkParameters:
        # Specify parameters with a set of values, yielding a 
        # solution space spanning the cartesian product of all 
        # parameter sets.
        - PrefetchLocalRead: [False, True]
        - PrefetchGlobalRead: [False, True]
        - ThreadTile:
          - [2, 2]
          - [4, 4]
        - WorkGroup:
          - [16, 16, 1]
          - [8, 8, 4]
        - WorkGroupMapping: [1, 4]
        - TransposeLDS: [0, 1]
        - LdsBlockSizePerPadA: [-1, 0, 64]
        - DepthU: [4, 8]
        - StoreVectorWidth: [-1, 1, 2, 4]
      BenchmarkFinalParameters:
        - ProblemSizes:
          # Specify the dimensions of the problems that the solutions
          # should be evaluated on.
          - Exact: [2048, 2048, 1, 4096]
          - Range: [ [128, 128, 128, 1408], [128, 128, 128, 1408], [1], [256, 512, 512, 2048] ]

# Specify appropriate parameters for your target device.
LibraryLogic:
  ScheduleName: "navi31"
  ArchitectureName: "gfx1100"

LibraryClient:

4) Build as follows:

mkdir build
cd build
../Tensile/bin/Tensile ../Tensile/Configs/rocblas_sgemm_example.yaml ./

5) Execute client as

./0_Build/client/tensile_client --config-file ./4_LibraryClient/source/ClientParameters_Cijk_Ailk_Bljk_SB.ini

Please edit the LibraryLogic with the appropriate ScheduleName and ArchitectureName for your target device. Please give that a try and let me know if the issue persists.